目录
1.使用ORDER BY 子句
SELECT p.Name,h.EndDate,h.LIstPrice
FROM Production.Product p
INNER JOIN Production.ProductListPriceHistory h ON
p.ProductID=h.ProductID
ORDER BY p.Name,h.EndDate
SELECT p.Name,h.EndDate,h.LIstPrice
FROM Production.Product p
INNER JOIN Production.ProductListPriceHistory h ON
p.ProductID=h.ProductID
ORDER BY p.Name DESC,h.EndDate DESC
SELECT p.Name
FROM Production.Product p
ORDER BY p.Color