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 |
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2007-02-12 : 02:56:51
|
how can I select a random 2 records from a query?can i do this in sql? |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-02-12 : 03:06:23
|
Yesselect top 2 * from yourtable order by newid() KH |
 |
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2007-02-12 : 03:26:58
|
but i don't wnat it ordered by my id -- i want each time a different 2 records to show up - is this possible? |
 |
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2007-02-12 : 03:41:45
|
never mind i tried it -- id didn't realilze newid was a sql - thanks |
 |
|
|
|
|