Skip to content
BEAD

SQL JOIN Helper

Visual reference for INNER / LEFT / RIGHT / FULL / CROSS / SELF joins with live-simulated results.

LEFT (OUTER) JOIN

All rows from the left; right-side columns are NULL when there's no match.

Example query
SELECT u.id, u.name, o.id, o.total
FROM users u
LEFT JOIN orders o ON o.user_id = u.id;
users
idname
1Alice
2Bob
3Carol
orders
iduser_idtotal
100142
10117
102215
103999
Result (4 rows)
u.idu.nameo.ido.total
1Alice10042
1Alice1017
2Bob10215
3CarolNULLNULL

Mental model

Every JOIN starts as a Cartesian product (every left row × every right row) and is then filtered by the ON condition. The flavor (INNER, LEFT, etc.) controls what happens to rows that don't match.

Pick by question

  • “Only matching rows” → INNER
  • “All on the left plus matches” → LEFT
  • “All on the right plus matches” → RIGHT
  • “Everything from both sides” → FULL OUTER
  • “Every pairing” → CROSS

You might also like