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 |
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2010-10-07 : 11:19:01
|
How to retrieve the rows of randoms numbers.Ex:there are 10 rows of the randoms number RandomNo-------4367912508I need a query to retrive 5 rows random.like sampling techniques. |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2010-10-07 : 11:56:02
|
select top 5 *from yourTableorder by newid()-- this is the random partJimEveryday I learn something that somebody else already knew |
 |
|
|
|
|