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 1

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


Eloise Bowser

Eloise Bowser

May I simply say what a relief to find a person that actually knows what they’re talking about on the net. You certainly understand how to bring a problem to light and make it important. More people really need to read this and understand this side of the story. I was surprised that you are not more popular given that you most certainly possess the gift.