我怎样才能得到基于两列mysql的升序结果?就像我想要1,2,3,4,5或1,1,2,2,3,4,4,5,5但其他值在其他列上。基于两列的升序结果mysql
sample table
-------------
col1 col2
741 0
742 0
743 0
744 0
745 743
------------
Expected output
-------------
col1 col2
741 0
742 0
743 0
745 743
744 0
------------
通过col1时,它会发现col2上的下一个数字,因此它将添加到asc。
这是怎么发生的? 744不大于745 – Ceeee
'col2'是否总是低于'col1'? – shmosel