The following example produces a list of employees, sorted by dept_no and salary. Note that one of the ORDER BY sort columns, salary, is not specified in the select list.
SELECT name, dept_no FROM employee ORDER BY dept_no, salary;
The following example produces a list of employees, sorted by dept_no and salary. Note that one of the ORDER BY sort columns, salary, is not specified in the select list.
SELECT name, dept_no FROM employee ORDER BY dept_no, salary;