且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL以不同的排序顺序对多列进行排序

更新时间:2023-01-29 18:47:52

查询所得到的是max date,然后是max datemax intnum,然后是max date

What your query does is get the max date, followed by the max intnum of the max date followed by the max bigintnum of the max intnum of the max date

换句话说,您的查询不会返回所有三列的最大值

In other words, your query would not return the maximum value of all three columns

它先按日期排序,然后按整数顺序,然后按bigintnum顺序排列 结果将是这样

It orders by the date first, then the intnum, then the bigintnum The results would be something like this

2011-07-20    12    14
2011-07-20    12    13
2011-07-20    11    16
2011-07-20    10    12
2011-07-19    20    15
2011-07-18    60    30
2011-07-18    50    14