select 配合limit 指定显示多行内容
2019-07-19 本文已影响0人
蔺蔺蔺赫赫
LIMIT
SELECT *
FROM city
WHERE countrycode='CHN'
ORDER BY population DESC
LIMIT 5; 显示5行
SELECT *
FROM city
WHERE countrycode='CHN'
ORDER BY population DESC
LIMIT 10; 显示10行
SELECT *
FROM city
WHERE countrycode='CHN'
ORDER BY population DESC
LIMIT 5,3;跳过头5行 显示随后3行
LIMIT M,N 跳过M行,显示N行