Skip to content

Quick Reference Summary

Join TypeReturnsNULL appears when
INNER JOINOnly rows with a match in both tablesNever (unmatched rows are dropped entirely)
LEFT JOINAll rows from left + matched rows from rightRight-side columns when left has no match
RIGHT JOINMatched rows from left + all rows from rightLeft-side columns when right has no match
FULL OUTERAll rows from both tablesEither side when the other has no match
CROSS JOINEvery combination (no ON condition)Never (all combinations are output)
SELF JOINA table joined to itself via aliasesDepends on whether LEFT or INNER is used
Anti-JoinRows that have NO match in the other tableUsed intentionally to find unmatched rows