MySql中随机提取数据库N条记录
select * from TableName order by rand() limit N
SQLServer中随机提取数据库N条记录
select top N * from TableName order by NEWID()
Access中随机提取数据库N条记录
SELECT top N * FROM TableName ORDER BY Rnd(Id)
Id:为你当前表的唯一ID字段名
2022-05-19 04:44:36
MySql中随机提取数据库N条记录
select * from TableName order by rand() limit N
SQLServer中随机提取数据库N条记录
select top N * from TableName order by NEWID()
Access中随机提取数据库N条记录
SELECT top N * FROM TableName ORDER BY Rnd(Id)
Id:为你当前表的唯一ID字段名
下一篇:JSP连接access数据库