mysql limit和offset用法

limit和offset用法

mysql里分页一般用limit来实现

取前3条数据

1. select * from article LIMIT 3;

 

跳过第一个,取2、3、4三条数据

2. select * from article LIMIT 3 OFFSET 1;

 

也可以简写为

3. select* from article LIMIT 1,3;

posted @ 2022-04-08 09:38  超级宝宝11  阅读(536)  评论(0)    收藏  举报