1Z0-071 · Question #228
Examine the structure of the employees table: There is a parent/child relationship between EMPLOYEE_ID and MANAGER_ID. You want to display the name, joining date, and manager for all the employees…
The correct answer is B. SELECT e.last_name, e.hire_date, NVL(m.last_name, 'No Manager') Manager FROM employees e. We should use LEFT OUTER JOIN as we want to display employees which have no (have NULL values for) managers.
Question
Examine the structure of the employees table:
There is a parent/child relationship between EMPLOYEE_ID and MANAGER_ID. You want to display the name, joining date, and manager for all the employees. Newly hired employees are yet to be assigned a department or a manager. For them, 'No Manager1 should be displayed in the manager column. Which SQL query gets the required output?
Exhibit
Options
- ASELECT e.last_name, e.hire_date, NVL(m.last_name, 'No Manager') Manager FROM employees e
- BSELECT e.last_name, e.hire_date, NVL(m.last_name, 'No Manager') Manager FROM employees e
- CSELECT e.last_name, e.hire_date, NVL(m.last_name, 'No Manager') Manager FROM employees e
- DSELECT e.last_name/ e.hire_date/ NVL(m.last_______ name/ 'No Manager') Manager FROM
How the community answered
(59 responses)- A10% (6)
- B83% (49)
- C5% (3)
- D2% (1)
Explanation
We should use LEFT OUTER JOIN as we want to display employees which have no (have NULL values for) managers.
Topics
Community Discussion
No community discussion yet for this question.
