站长资源数据库

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

整理:jimmy2024/12/29浏览2
简介ORDER BY _column1, _column2; /* _column1升序,_column2升序 */ ORDER BY _column1, _column2 DESC; /* _column1升序,_column2降序 */ ORDER BY _column1 DESC, _column
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降序 */