SELECT field1, field2,…fieldN FROM table_name1, table_name2…
ORDER BY field1 [ASC [DESC][默认 ASC]], [field2…] [ASC [DESC][默认 ASC]]
可以设置多个字段进行排序
ASC : Ascending order 升序,从小到大
DESC: Descending order 降序,从大到小
假设,table表中有数据列 id为 1,2,3,4,5,6,7,8
则 select id from table_name order by id 或者 select id from table_name order by id ASC结果均为:1,2,3,4,5,6,7,8
select id from table_name order by id DESC 结果为:8,7,6,5,4,3,2,1