Home > Database > Mysql Tutorial > MySQL 分页_MySQL

MySQL 分页_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:29:54
Original
810 people have browsed it

bitsCN.com

关于 MySQL 的分页语句。

 1 ## 前 N 条记录 2 SELECT * FROM [TAB_NAME]  3 LIMIT N 4  5 ## 得到表中的第 [N + 1]条 到 [N + M]条 记录,共 M 条 6 SELECT * FROM [TAB_NAME]  7 LIMIT N, M 8  9 ## PAGE_NUM - 当前页10 ## PAGE_SIZE - 每页显示条数11 SELECT * FROM [TAB_NAME] 12 LIMIT ([PAGE_NUM] - 1) * [PAGE_SIZE], [PAGE_SIZE]
Copy after login

 

P.S. TOP 是 MS SQL Sever 的关键字

 

 

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