Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Random Number

Author  Topic 

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2005-08-20 : 12:22:56
Hello All,

Is there any Way i can get the 20 Random records from the Query.

Thanks in Advance ..

Complicated things can be done by simple thinking

Kristen
Test

22859 Posts

Posted - 2005-08-20 : 12:27:20
http://weblogs.sqlteam.com/mladenp/archive/2005/08/01/7421.aspx

Kristen
Go to Top of Page

kapilarya
Yak Posting Veteran

86 Posts

Posted - 2005-08-21 : 05:25:25
select top N * from <YourTable> order by newid()

Kapil Arya
Go to Top of Page
   

- Advertisement -