Blog · Guide

LEFT JOIN vs INNER JOIN: Which Rows Survive?

INNER keeps matches only. LEFT keeps every row from the left table. A clear picture of what you gain and lose.

orders order_id customer_id ← status JOIN customers → customer_id first_name city row
A JOIN stitches tables together using a shared key (here: customer_id).

INNER = intersection

Only rows that match on the join key. Orders without a matching customer (data bugs) disappear from an INNER JOIN result.

LEFT = keep the left table

Every left-table row stays. If the right side has no match, right-hand columns are NULL. Use LEFT when “don’t lose left rows” matters more than “only complete pairs.”

How to choose

Try it yourself

The fastest way to lock this in is a short drill on the same Northstar Market tables.

Practice JOINs on the shop

Related guides