您的位置:首页技术文章

从数据库中随机抽N条记录

【字号: 日期:2023-11-21 09:49:28浏览:79作者:馨心

Access:select top n * from table order by rnd(id)'id为数据库的自动编号字段

Sql Server:select top n * from table order by newid()