1,SQL Server:
SQL Server数据库有个NewID函数,可以很方便的用SQL语句得到数据表中的随机数据。
Select TOP N * From TABLE Order By NewID()
2,Access:
Randomize sql="select * from [表名] where id2="&r3("id2")&" and num_t<>"&a&" order by rnd(-(id+"&rnd()&")) desc"
3,MySql:
Select * From TABLE Order By Rand() Limit 10 |