我正在尝试在存储过程中将T-SQL ORDER BY用于SELECT语句,例如:
SELECT CustomerID, CustomerName, ContactName, Address, City, PostalCode,
Country
FROM Customers
ORDER BY Country ASC, CustomerName DESC, PostalCode DESC;
我的问题是,当我仅在Order By中使用两列时,结果集的顺序很好,但是当我包含第三列时,说PostalCode则无法正常工作。谁能让我知道确切的问题是什么。我读到我们可以在多个列上使用Order by。非常感谢您的帮助。