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?

Advanced3 Minutes380 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