Which SQL statement would you execute?

View the Exhibit and examine the structure of the EMPLOYEES table. You want to display
all employees and their managers having 100 as the MANAGER_ID. You want the output in

two columns: the first column would have the LAST_NAME of the managers and the second
column would have LAST_NAME of the employees. Which SQL statement would you
execute?

View the Exhibit and examine the structure of the EMPLOYEES table. You want to display
all employees and their managers having 100 as the MANAGER_ID. You want the output in

two columns: the first column would have the LAST_NAME of the managers and the second
column would have LAST_NAME of the employees. Which SQL statement would you
execute?

A.
SELECT m.last_name “Manager”, e.last_name “Employee” FROM employees m JOIN
employees e ON m.employee_id = e.manager_id WHERE m.manager_id=100;

B.
SELECT m.last_name “Manager”, e.last_name “Employee” FROM employees m JOIN
employees e ON m.employee_id = e.manager_id WHERE e.managerjd=100;

C.
SELECT m.last_name “Manager”, e.last_name “Employee” FROM employees m JOIN
employees e ON e.employee_id = m.manager_id WHERE m.manager_id=100;

D.
SELECT m.last_name “Manager”, e.last_name “Employee” FROM employees m JOIN
employees e WHERE m.employee_id = e.manager_id AND e.managerjd=100;



Leave a Reply 0

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