排序数据
SELECT prod_name FROM Products ORDER BY prod_name;
按多个列排序
SELECT prod_id, prod_price, pro_name FROM Products ORDER BY prod_price, prod_name;
按列位置排序
SELECT prod_if, prod_proce, prod_name FROM Products ORDER BY 2,3;
指定排序方向
SELECT prod_id, prod_price, prod_name FROM products ORDER BY prod_price DESC;
为了竞选降序排序,必须指定DESC关键字,
如果想在多个列上进行降序排序,必须对每一列指定DESC关键字。