单列排序
select * from products order by prod_price; select * from vendors order by vend_name;
按多个列排序
select * from verdors order by vend_country,vend_city;
指定排序方向
select * from verdors order by vend_country desc,vend_city asc; // desc 降序 asc 升序
小结
排序用到order by这个关键词,默认是升序(asc)降序是desc;多列排序时先按前面的字段排,然后按照后面的字段排序.
感谢大家观看.