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.
Author |
Topic |
oahu9872
Posting Yak Master
112 Posts |
Posted - 2007-11-08 : 16:53:45
|
I have large data sets where I would like to pick out random records. For example I might have a set of 5000 employee profiles and I want to write a select statement that picks out a random 50 of the 5000 records. Any ideas?Thanks |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-11-08 : 16:57:06
|
SELECT TOP 50 *FROM YourTableORDER BY NEWID()Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
oahu9872
Posting Yak Master
112 Posts |
Posted - 2007-11-08 : 16:59:48
|
Thanks |
 |
|
|
|
|