按列排序
- SELECT * FROM s_emp WHERE dept_id=41 ORDER BY salary DESC;:按部门 ID 41 查找员工并按工资降序排列。
- SELECT last_name, dept_id, salary FROM s_emp ORDER BY dept_id, salary DESC;:按部门 ID 和工资降序排列所有员工。
按列排序
- SELECT * FROM s_emp WHERE dept_id=41 ORDER BY salary DESC;:按部门 ID 41 查找员工并按工资降序排列。
- SELECT last_name, dept_id, salary FROM s_emp ORDER BY dept_id, salary DESC;:按部门 ID 和工资降序排列所有员工。