Return matched and unmatched rows from both tables.
Section: Joins
Full outer join
sql
sql
SELECT a.id AS a_id, b.id AS b_id
FROM a
FULL OUTER JOIN b ON b.id = a.id;Explanation
Useful for reconciliation queries.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Joins