limit&&limit offset

数据表a数据如下:

  • 列坐标从0开始
  • 查询多少列(包括当前列)从1开始

limit

select * from a limit 0,1    #0为列坐标,1为查询多少列

select * from a limit 1,1 

select * from a limit 0,2

limit offset

select * from a limit 1 offset 0    #0为列坐标,1为查询多少列

select * from a limit 1 offset 1 

select * from a limit 2 offset 0

posted @ 2020-03-23 10:58  she11s  阅读(130)  评论(0编辑  收藏  举报