-------------------------------------------------------------------------------- view plaincopy to clipboardprint?
select * from tablename order by rand() limit 10
select * from tablename order by rand() limit 10sqlserver中随机提取数据库记录
-------------------------------------------------------------------------------- view plaincopy to clipboardprint?
select top 10 * from tablename order by NEWID()
select top 10 * from tablename order by NEWID()Access中随机提取数据库记录
-------------------------------------------------------------------------------- view plaincopy to clipboardprint?
SELECT top 10 * FROM tablename ORDER BY Rnd(FId)
SELECT top 10 * FROM tablename ORDER BY Rnd(FId)FId:为你当前表的ID字段名
Copyright © 2019- sceh.cn 版权所有 湘ICP备2023017654号-4
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务