FULL OUTER JOIN preserves matching and unmatched rows from both tables. Filtering the result requires careful handling of NULL values.
FULL JOIN is often used for reconciliation, and careless filtering can remove the unmatched records you are trying to identify.
Find records that exist in only one of two customer systems.
SELECT
a.CustomerID AS SystemAID,
b.CustomerID AS SystemBID
FROM CustomerSystemA a
FULL OUTER JOIN CustomerSystemB b
ON a.CustomerID = b.CustomerID
WHERE a.CustomerID IS NULL
OR b.CustomerID IS NULL;
FULL JOIN filtering is useful for reconciliation, migration validation, data comparison, and system integration checks.
- FULL JOIN preserves both sides.
- Unmatched rows contain NULL values.
- IS NULL can identify unmatched records.
- WHERE conditions must be designed carefully.
- FULL JOIN is useful for reconciliation.
What happens to unmatched rows in FULL JOIN?
Unmatched rows from both tables are preserved, with NULL values on the missing side.
How can FULL JOIN find missing records?
Check whether the key from either side is NULL after the FULL JOIN.