Answer: Using LEFT JOIN
Find a detailed explanation of how to apply LEFT JOIN on tables.
Solution
The solution is given below:
Press + to interact
/* The query to apply LEFT JOIN */SELECT e.EmpName, p.ProjectNameFROM Employees AS eLEFT JOIN Projects AS p ON e.EmpID = p.EmpID;
Explanation
The explanation of the solution code is given below:
Line 2: The
SELECT
query selectsEmpName
andProjectName
fromEmployees
andProjects
, respectively. We useAS
to set an alias for the tables.Line 3: The data is retrieved from the
Employees
...