1Z0-047 · Question #123
View the Exhibit and examine the details of the EMPLOYEES table. Evaluate the following SQL statements: Statement 1: SELECT employee_id, last_name, job_id, manager_id FROM employees START WITH…
The correct answer is C. The output of statement 1 would neither display the employee with MANAGER_ID 108 nor any employee D. The output for statement 2 would not display the employee with MANAGER_ID 108 but it would display. See the full explanation below for the reasoning.
Question
View the Exhibit and examine the details of the EMPLOYEES table. Evaluate the following SQL statements:
Statement 1:
SELECT employee_id, last_name, job_id, manager_id FROM employees START WITH employee_id = 101 CONNECT BY PRIOR employee_id = manager_id AND manager_id != 108 ; Statement 2:
SELECT employee_id, last_name, job_id, manager_id FROM employees WHERE manager_id != 108 START WITH employee_id = 101 CONNECT BY PRIOR employee_id = manager_id; Which two statements are true regarding the above SQL statements? (Choose two.)
Exhibit
Options
- AStatement 2 would not execute because the WHERE clause condition is not allowed in a statement that
- BThe output for statement 1 would display the employee with MANAGER_ID 108 and all the employees
- CThe output of statement 1 would neither display the employee with MANAGER_ID 108 nor any employee
- DThe output for statement 2 would not display the employee with MANAGER_ID 108 but it would display
How the community answered
(54 responses)- A7% (4)
- B13% (7)
- C80% (43)
Community Discussion
No community discussion yet for this question.
