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;
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;
