Skip to main content
SQL โ€ข LESSON 21

SQL FULL OUTER JOIN

How can we return all records from both tables regardless of whether they match?

Advancedโฑ 3 Minutesโญ 380 XP
๐Ÿค” THE QUESTION

How can we return all records from both tables regardless of whether they match?

๐Ÿ’ก WHAT IS IT?

FULL OUTER JOIN combines the results of both LEFT and RIGHT joins, filling non-matching fields with NULL.

๐ŸŽฏ WHAT IS IT USED FOR?

Data reconciliation, data quality gap checks, merging system records across disparate sources.

๐Ÿ’ป EXAMPLE
SELECT employees.name,
departments.department_name
FROM employees
FULL OUTER JOIN departments
ON employees.department_id = departments.id;

๐ŸŽฏ Mission Objectives

Practice typing production-grade SQL code for SQL FULL OUTER JOIN.

  • โœ“ FULL OUTER JOIN
  • โœ“ Full reconciliation
  • โœ“ NULL matching
  • โœ“ ON condition