Step 9
5 min read

FULL OUTER JOIN

Learn how to get all records from both tables.

What is FULL OUTER JOIN?

FULL OUTER JOIN shows ALL rows from BOTH tables, whether they match or not.

Simple analogy: Show all students and all classes, whether matched or not.

Basic Example

SELECT students.name, enrollments.course FROM students FULL OUTER JOIN enrollments ON students.id = enrollments.student_id;

Result:

  • All students (even without classes)
  • All classes (even without students)

When to Use

Use when you need complete data from both tables.

Example: Full inventory report showing all products and all warehouse locations.

What Comes Next

Next: Self Join (joining a table to itself)

Finished this topic?

Mark it complete to track your progress and maintain your streak!

SkillsetMaster - AI, Web Development & Data Analytics Courses