zoukankan      html  css  js  c++  java
  • Mysql---9 分页和排序

    1.分页  limit  offset 和排序 order by   desc  降序  asc 升序

      select  a.1,2,3,4 from a

           inner join b

            on a.1=b.1

               inner join c

                on c.2=b.2  

                    where 3='xxx'

                     order by 4 desc (asc);

    2.分页是所有select where条件的最后一项; limit  起始值,行数   

        limit    (n-1)*pageSize  ,pageSize      页数=数据总数/pageSize   ---pageSize 页面大小;

          

    select  a.1,2,3,4 from a

           inner join b

            on a.1=b.1

               inner join c

                on c.2=b.2  

                    where 3='xxx'

                     order by 4 desc (asc)  

                      limit 0,10;

  • 相关阅读:
    django media配置
    django model项目外操作
    django 快捷代码提示
    django静态文件路径配置
    selenium爬取网易云
    selenium
    pyquery
    beautifulsoup
    Kafka与.net core(三)kafka操作
    Oracle 日期类型timestamp(时间戳)和date类型使用
  • 原文地址:https://www.cnblogs.com/chencn/p/12303392.html
Copyright © 2011-2022 走看看