limit子句用于限制查询结果返回的数量
s格式:
select * from tableName limit i,n
tableName:表名
i:为查询结果的索引值(默认从0开始),当i=0时可省略i
n:为查询结果返回的数量
i与n之间使用英文逗号","隔开
栗子:
select * from Customer LIMIT 10;
检索前10行数据,显示1-10条数据
select * from Customer LIMIT 1,10;
检索从第2行开始,累加10条id记录,共显示id为2…11
select * from Customer limit 5,10;
检索从第6行开始向前加10条数据,共显示id为6,7…15
select * from Customer limit 6,10;