jum-bolg
-- 分页
      -- limit
      -- limit start count    (start 显示骑士值,单页数量)
      select *from student where gender=1 limit 6,3;

      -- 分页
      -- 以3行为一页,分页
      -- 第一页
      select *from student limit 0,3;
      -- 第二页
      select *from student limit 3,3;
      -- 第三页
      select *from student limit 6,3;
      -- 分页式   limit(第n页-1)*count ,count

      -- 查询所有男性, 2个数据为一页,以年龄倒序
      select *from student where gender=1 order by age desc limit 0,2;

      --  limit 始终要在最后
      --失败 select *from student where gender=1 limit 0,2 order by age desc ;
      -- limit 不支持数学表达式
      -- 失败 显示第三页  select *from student where gender=1 limit (3-1)*2,2

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-18
猜你喜欢
  • 2021-11-13
  • 2021-12-28
  • 2021-09-16
  • 2021-06-29
  • 2021-08-26
相关资源
相似解决方案