您的位置:首页 > 数据库 > MySQL

MySql查询分页的几种方式例句

2017-08-15 23:10 246 查看
1.采用limit关键字进行分页

select * from table order by id asc limit 100,20

2.使用top关键字

select top 20 * from table where id not in(select top 100 from table order by id asc)order by id

3.使用大于或者小于条件

select * from table where id > 100 order by id limit 20
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql分页