SQL ORDER BY 关键字
order by 关键字用于对结果集按照一个列或者多个列进行排序。
order by 关键字默认按照升序对记录进行排序。如果需要按照降序对记录进行排序,您可以使用 desc 关键字。
1. order by 语法
select column_name,column_name
from table_name
order by column_name,column_name asc|desc;
from table_name
order by column_name,column_name asc|desc;