第05章 排序与分页
创作日期:2021-11-20
1.排序数据
1.1 排序规则
- 使用 ORDER BY 子句排序
- ASC (ascend):升序
- DESC(descend):降序
- ORDER BY 子句在SELECT语句的结尾
1.2 单列排序
ASC (ascend):升序
SELECT first_name,salary FROM employees ORDER BY salary ASC;
(descend):降序
SELECT first_name,salary FROM employees ORDER BY salary DESC;
</