The following example produces a list of employees, sorted by dept_no and salary. One ORDER BY sort column, 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. One ORDER BY sort column, salary, is not specified in the select list.
SELECT name, dept_no FROM employee ORDER BY dept_no, salary;