Which join clause should you use to complete the query?

You have a table named Employees.
You want to identify the supervisor to which each employee reports. You write the following query.
SELECT e.EmloyeeName AS [EmployeeName],
s.EmployeeName AS [SuperVisorName]
FROM Employees e
You need to ensure that the query returns a list of all employees and their respective supervisor.
Which join clause should you use to complete the query?

You have a table named Employees.
You want to identify the supervisor to which each employee reports. You write the following query.
SELECT e.EmloyeeName AS [EmployeeName],
s.EmployeeName AS [SuperVisorName]
FROM Employees e
You need to ensure that the query returns a list of all employees and their respective supervisor.
Which join clause should you use to complete the query?

A.
LEFT JOIN Employees s
ON e.ReportsTo = s.EmployeeId

B.
RIGHT JOIN Employees s
ON e.ReportsTo = s.EmployeeId

C.
INNER JOIN Employees s
ON e.EmployeeId = s.EmployeeId

D.
LEFT JOIN Employees s
ON e.EmployeeId = s.EmployeeId



Leave a Reply 0

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