FULL OUTER JOIN

SQL FULL OUTER JOIN Keyword

The FULL OUTER JOIN keyword returns all records when there is a match in either the left or the right table. Records without a match in either table will still appear in the result, with NULL values where applicable.

Tutorials dojo strip

SQL FULL OUTER JOIN Syntax

SQL

SQL FULL OUTER JOIN Example

This SQL statement selects all patients and all appointments, even when there’s no match between them:

SQL

Note: This example does not work in SQLite or in our TechKubo playground because FULL OUTER JOIN is not supported in SQLite. Use only in MySQL, PostgreSQL, SQL Server, or Oracle.

SQL FULL OUTER JOIN Labs

Tutorials dojo strip