Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在使用order by子句对表进行排序时使用了三列。第一列按升序排序,其他两列按降序排序。在我的情况下,所有三列都必须按升序排序。
order by
你能给我解决这个问题吗?
您可以在ORDER BY子句中包含任意数量的字段:
ORDER BY
SELECT a, b, c FROM the_table ORDER BY a ASC, b ASC, c ASC;