4. Selecting ROWS to display: Step 23

Task

List the employee numbers of all the managers (1).

Note that there are two possible definitions of 'Manager' : as an employee with the job 'MANAGER' or employees whose number appears in the 'mgr' column of some other employee. We will try both definitions.

First: list the employee numbers of all the managers based on the entry in the 'job' column. DISTINCT is not required here.

SQL statement