By MBPDLPayday Loans

随机选取数据库中的N条记录

select top 10 * from tablename order by NEWID() –这个是SQL Server的用法

select * from tablename order by rand() limit 10 –这个是mysql的用法

Leave a Reply