QuestionQ262

VerifiedDisplaying Data from Multiple Tables

Examine the following statement, which returns the name of every employee and that employee’s manager:

Question Image

You want to extend the query to include employees who have no manager. What must you add before JOIN to accomplish this?

Explanation

A LEFT OUTER JOIN preserves all rows from employees, the table on the left side of the join. Employees whose manager_id has no matching employee_id in the manager alias are still returned, with the manager columns set to NULL.

Community Discussion

No comments yet. Be the first to start the discussion!