Heim >Datenbank >MySQL-Tutorial >MySQL 分页_MySQL

MySQL 分页_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:29:54813Durchsuche

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]

 

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

 

 

bitsCN.com
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn