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 |
|
p2bl
Yak Posting Veteran
54 Posts |
Posted - 2001-09-07 : 10:21:11
|
| Now.here is a table which has one identity column "ID",and some other columns.The question is:how to generate a random order use "SELECT" clause?I have tried with rand() SELECT id,....,rand() as rnder from table1 order by rnderbut it doesn't work,cause rand() only excute once.so I make a little changeSELECT id,....,rand(id) as rnder from table1 order by rnderthis time,rand have a seed,but every time the SQL execute,it has the same order.now,I have no idea.Can u help me?? |
|
|
|
|
|