各种数据库随机读取n条数的方法 - 高飞网
155 人阅读

各种数据库随机读取n条数的方法

2017-07-28 02:09:46


数据库sql
MySqlselect * from tablename order by rand() limit 10
SQLServerselect top 10 * from tablename order by NEWID()
accessSELECT top 10 * FROM tablename ORDER BY Rnd(FId)  
Oracle
select * from (select * from tb_phone_no order by sys_guid()) where rownum < 10;


还没有评论!
54.80.211.135