LEFT JOIN Practice
LEFT JOIN returns ALL rows from the left table, plus matching rows from the right table. If there's no match, you get NULL values for the right table's columns.
LEFT JOIN Visualization
Table A (LEFT) Table B
+----+ +----+
| 1 | JOIN | 1 | ← Matched
| 2 | ==== | 3 |
| 3 | | 4 |
+----+ +----+
Result:
| A | B |
|---|------|
| 1 | 1 | ← Matched
| 2 | NULL | ← No match, but included with NULL
| 3 | 3 | ← Matched
When to Use LEFT JOIN
Use LEFT JOIN when you want ALL records from one table, regardless of whether they have related records in another table.
Example: "Show all users, including those who haven't placed orders"
Exercises
Loading exercise...
Loading exercise...
Loading exercise...
Loading exercise...
Loading exercise...
INNER vs LEFT JOIN
| JOIN Type | Returns |
|---|---|
| INNER JOIN | Only matching rows from both tables |
| LEFT JOIN | All rows from left table + matches from right |
Free Practice
Loading SQL editor...
Try:
- Find categories with no products
- List all products with order counts (including 0)
- Compare LEFT JOIN vs INNER JOIN results

