Access:
select top n * from table order by rnd(id)‘id为数据库的自动编号字段
Sql Server:
select top n * from table order by newid()
MySQL:
SELECT * FROM table order by rand() limit 20;
Oracle:
select * from table order by dbms_random.value()
Access:
select top n * from table order by rnd(id)‘id为数据库的自动编号字段
Sql Server:
select top n * from table order by newid()
MySQL:
SELECT * FROM table order by rand() limit 20;
Oracle:
转载于:https://www.cnblogs.com/pmars/archive/2012/02/08/2342556.html