LIMIT子句用来限制被SELECT语句返回的行数。用于限制记录数或获取指定区间的记录。
语法:LIMIT {[offset,] row_count | row_count OFFSET offset};
SELECT * FROM mydb.sh_goods LIMIT 0, 9; # LIMIT offset, row_count ;
SELECT * FROM mydb.sh_goods LIMIT 5; # LIMIT row_count ;
SELECT * FROM mydb.sh_goods LIMIT 6 OFFSET2;
#LIMIT row_count OFFSET offset ;