我們可以在 ORDER BY 子句中指定多列,以根據這些多列獲得排序的輸出。以下是使這個概念更清晰的例子 -
mysql> Select * from Student ORDER BY Name, Address; +------+---------+---------+-----------+ | Id | Name | Address | Subject | +------+---------+---------+-----------+ | 2 | Aarav | Mumbai | History | | 1 | Gaurav | Delhi | Computers | | 15 | Harshit | Delhi | Commerce | | 17 | Raman | Shimla | Computers | +------+---------+---------+-----------+ 4 rows in set (0.12 sec)
以上是我們如何獲得基於多列的排序輸出?的詳細內容。更多資訊請關注PHP中文網其他相關文章!