Which two statements are true regarding the output of the following SQL statement?

View the Exhibit and examine the description of the EMPLOYEES table.
Evaluate the following SQL statement:
SELECT employee_id, last_name, job_id, manager_id, LEVEL
FROM employees
START WITH employee_id = 101
CONNECT BY PRIOR employee_id=manager_id ;
Which two statements are true regarding the output of this command? (Choose two.)

View the Exhibit and examine the description of the EMPLOYEES table.

Evaluate the following SQL statement:
SELECT employee_id, last_name, job_id, manager_id, LEVEL
FROM employees
START WITH employee_id = 101
CONNECT BY PRIOR employee_id=manager_id ;

Which two statements are true regarding the output of this command? (Choose two.)

A.
The output would be in top-down hierarchy starting with EMPLOYEE_ID having value 101.

B.
The output would be in bottom-up hierarchy starting with EMPLOYEE_ID having value 101.

C.
The LEVEL column displays the number of employees in the hierarchy under the employee having the EMPLOYEE_ID 101.

D.
The LEVEL column displays the level in the hierarchy at which the employee is placed under the employee having the EMPLOYEE_ID 101.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


User

User

SELECT last_name “Employee”, CONNECT_BY_ISCYCLE “Cycle”,
LEVEL, SYS_CONNECT_BY_PATH(last_name, ‘/’) “Path”
FROM employees
WHERE level <= 3 AND department_id = 80
START WITH last_name = 'King'
CONNECT BY NOCYCLE PRIOR employee_id = manager_id AND LEVEL <= 4;

Employee Cycle LEVEL Path
————————- —— —— ————————-
Russell 1 2 /King/Russell
Tucker 0 3 /King/Russell/Tucker
Bernstein 0 3 /King/Russell/Bernstein
Hall 0 3 /King/Russell/Hall
Olsen 0 3 /King/Russell/Olsen
Cambrault 0 3 /King/Russell/Cambrault
Tuvault 0 3 /King/Russell/Tuvault
Partners 0 2 /King/Partners
King 0 3 /King/Partners/King
Sully 0 3 /King/Partners/Sully
McEwen 0 3 /King/Partners/McEwen