• iconteach@devfunda.com

FULL OUTER JOIN

FULL OUTER JOIN

07-09-2025 00:00:00 Time to read : 12 Minutes

A FULL OUTER JOIN (or simply FULL JOIN) retrieves all rows from both the left and right tables. Where matching records exist, they are combined into a single row. If no match is found, the columns from the missing side are filled with NULL values.

outer_join_postgresql

Show all employees and departments, including unmatched ones:


SELECT e.emp_name, d.dept_name
FROM employees e
FULL OUTER JOIN departments d
ON e.dept_id = d.dept_id;

Output : Combines results of LEFT and RIGHT join.

Want to learn in class