sql语句中的limit用法
limit y 读取y条数据
limit x,y 跳过x条数据,读取y条数据
limit y offset x 跳过 x条数据,读取y条数据
- select* from student limit 10 …检索前10行的数据
- select* from student limit 5,10 …检索从第6行开始到第10行的数据
- select* from student limit 4,-1 …检索第5行数据后面的所有数据
- select* from student limit 5 offset 2 …检索第3行开始到第5行数据