首页 >数据库 >mysql教程 >从数据库中随机抽N条记录_MySQL

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-01 14:05:40925浏览

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

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

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn