Mysql中limit和offset的用法

limit和offset用法

mysql里分页一般用limit来实现

1. select* from article LIMIT 1,3

2.select * from article LIMIT 3 OFFSET 1

上面两种写法都表示取2,3,4三条条数据

 

示例:

select* from article LIMIT 1,3  

解释:第一个数字表示开始 取的数的下标(下标从0开始),第二个数字表示取3tiao数据

select* from atticle LIMIT 3 

解释:表示取前三条数据

select* from article LIMIT 3 OFFSET 1

解释:表示取三条数据,并跳过一条数据 

 

TRANSLATE with x English
Arabic Hebrew Polish
Bulgarian Hindi Portuguese
Catalan Hmong Daw Romanian
Chinese Simplified Hungarian Russian
Chinese Traditional Indonesian Slovak
Czech Italian Slovenian
Danish Japanese Spanish
Dutch Klingon Swedish
English Korean Thai
Estonian Latvian Turkish
Finnish Lithuanian Ukrainian
French Malay Urdu
German Maltese Vietnamese
Greek Norwegian Welsh
Haitian Creole Persian  
Mysql中limit和offset的用法 Mysql中limit和offset的用法 Mysql中limit和offset的用法 Mysql中limit和offset的用法   TRANSLATE with Mysql中limit和offset的用法 COPY THE URL BELOW Mysql中limit和offset的用法 Mysql中limit和offset的用法 Back EMBED THE SNIPPET BELOW IN YOUR SITE Mysql中limit和offset的用法 Enable collaborative features and customize widget: Bing Webmaster Portal Back
上一篇:杂题训练之二


下一篇:Ubuntu18.04安装compiz后死机无法进入图形桌面,提示watchdog: BUG: soft lockup - CPU#1 stuck for 22s!如何解决,测试有效!