We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 18,095 times

Related Categories

Randomly Sorting Records

Ever needed to grab a selection of random rows from a table? Well, it's surprisingly easy in SQL Server 2000, using the NEWID() method. The code below selects 10 random rows from "myTable".

SELECT TOP 10 id,title FROM myTable ORDER BY NEWID()

Great!

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments

  • Re: [4680] Randomly Sorting Records

    Posted by om_r2004 on 28 Apr 2006

    Hi iam Ram fro Hyderabad doing MCA ,Urs functin is very nice ,iam going to develop a pos software ,i need ur help on Database and query desinging. thank Q