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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:29:501238browse

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

 

 

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

 

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

 

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