SQL随机选择N条数据,SQL随机查询数据

SELECT `sp_id`,`sp_name`,`sp_model` FROM `sp` where `sp_type`=1 and `com_net`=0 order by rand() limit 20   这个是MYSQL

select top 10 * from oblog_user order by newid() 这个是MSSQL

原文地址:https://www.cnblogs.com/subendong/p/2864877.html