1. Oracle,随机查询20条
select * from( select * from 表名 order by dbms_random.value)
where rownum <= 20;
2.SQL Server,随机查询20条
select top 20 * from 表名order by newid()
3.My SQL:,随机查询20条
select * from 表名 order by rand() limit 20
1. Oracle,随机查询20条
select * from( select * from 表名 order by dbms_random.value)
where rownum <= 20;
2.SQL Server,随机查询20条
select top 20 * from 表名order by newid()
3.My SQL:,随机查询20条
select * from 表名 order by rand() limit 20
转载于:https://www.cnblogs.com/402088881/archive/2010/09/17/1829557.html