-- 分页查询
-- 1,查询product的前五条记录
select * from product limit 5;
-- 2,从第四条开始,显示五条
select * from product limit 3,5;
-- 3,分页显示
select * from product limit 0,60;# 第一页
select * from product limit 60,120;#第二页
select * from product limit 120,60;#第三页,每页60
select * from product limit (n-1)*60,60;
MYSQL 寒假自学 2022 八(一)
最新推荐文章于 2024-09-15 20:24:46 发布