Home > Database > Mysql Tutorial > 从数据库中随机抽N条记录_MySQL

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 14:05:40
Original
928 people have browsed it

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

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template