Home > Database > Mysql Tutorial > MySQL_数据分页查询(limit用法)_MySQL

MySQL_数据分页查询(limit用法)_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:29:50
Original
1229 people have browsed it

bitsCN.com

MySQL_数据分页查询(limit用法)

 

取前5条数据[sql] select * from table_name limit 0,5  或[sql] select * from table_name limit 5  取第11条到第15条数据,共5条[sql] select * from table_name limit 10,5  limit关键字的用法:LIMIT [offset,] rows
Copy after login

 

 

offset指定要返回的第一行的偏移量,rows第二个指定返回行的最大数目。

 

初始行的偏移量是0(不是1)。

 

bitsCN.com
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