1 sql server的随机函数newID()和RAND()
2 SELECT * FROM Northwind..Orders ORDER BY NEWID()
3
4 --随机排序
5
6 SELECT TOP 10 * FROM Northwind..Orders ORDER BY NEWID()
7
8 --从Orders表中随机取出10条记录
9
2 SELECT * FROM Northwind..Orders ORDER BY NEWID()
3
4 --随机排序
5
6 SELECT TOP 10 * FROM Northwind..Orders ORDER BY NEWID()
7
8 --从Orders表中随机取出10条记录
9