mysql 中的升序和降序

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_40990854/article/details/84203298

MySQL 中  排序怎么都记不住,这里我把它的全拼找到 了


    desc是descend 降序意思 
    asc 是ascend 升序意思
    sql = "select 表内容名    from   数据库表名 Putout=true order by 读取的排序表名 asc"

例如
sql = "select  *  from   user   where  Putout=true   order by time    desc"    //按最新时间来排序
sql = "select  *  from   user   where  Putout=true   order by time    asc"      //按早时间来排序

猜你喜欢

转载自blog.csdn.net/qq_40990854/article/details/84203298