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

562 查看

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降序 */