NATURAL LEFT JOIN combines tables using automatically detected common columns while retaining all rows from the left table.
It demonstrates how automatic matching can be combined with outer-join behavior, although explicit JOIN conditions are generally safer.
Return all employees and their department information where matching columns exist.
SELECT
EmployeeName,
DepartmentName
FROM Employees
NATURAL LEFT JOIN Departments;
Primarily useful for understanding SQL behavior and controlled schemas.
- All left-table rows are preserved.
- Common columns are used automatically.
- Unmatched right-side values become NULL.
- Unexpected common columns can affect results.
- Explicit LEFT JOIN is generally more predictable.
What does NATURAL LEFT JOIN preserve?
It preserves every row from the left table, including rows without a matching row on the right.
What happens when no matching right row exists?
Columns from the right table are returned as NULL.