SQL-ORDER BY 多字段排序(升序、降序)

(编辑:jimmy 日期: 2024/11/13 浏览:2)

ORDER BY _column1, _column2; /* _column1升序,_column2升序 */ 

ORDER BY _column1, _column2 DESC; /* _column1升序,_column2降序 */ 

ORDER BY _column1 DESC, _column2 ; /* _column1降序,_column2升序 */ 

ORDER BY _column1 DESC, _column2 DESC; /* _column1降序,_column2降序 */