sql语句排序, 在查询结果中按人数降序排列,若人数相同,则是按课程号升序排列吗?

如题所述

第1个回答  2022-11-16

一般是这样的。

select * from tableA order by col1 desc,col2 asc;

先按col1降序,相同则按col2 升序

相似回答
大家正在搜