MYSQL 寒假自学 2022 八(一)

阅读 38

2022-02-03

-- 	分页查询
--  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;

精彩评论(0)

0 0 举报