Recall & Review
beginner
What does a LEFT JOIN do in SQL?
A LEFT JOIN returns all rows from the left table and the matching rows from the right table. If there is no match, the result shows NULL for columns from the right table.
Click to reveal answer
beginner
Why do some columns show NULL values after a LEFT JOIN?
Columns from the right table show NULL when there is no matching row for the left table's row in the right table.
Click to reveal answer
beginner
Write a simple LEFT JOIN query to get all customers and their orders, including customers with no orders.
SELECT customers.id, customers.name, orders.id AS order_id FROM customers LEFT JOIN orders ON customers.id = orders.customer_id;
Click to reveal answer
beginner
What happens if you use INNER JOIN instead of LEFT JOIN in the same query?
INNER JOIN returns only rows where there is a match in both tables. Customers without orders would be excluded.
Click to reveal answer
intermediate
How can you find rows from the left table that have no matching rows in the right table using LEFT JOIN?
Use a LEFT JOIN and then filter with WHERE right_table.column IS NULL to find unmatched rows.
Click to reveal answer
What does a LEFT JOIN return when there is no matching row in the right table?
✗ Incorrect
LEFT JOIN returns all rows from the left table and fills NULL for right table columns when no match exists.
Which SQL clause filters rows where the right table has no match after a LEFT JOIN?
✗ Incorrect
Filtering with WHERE right_table.column IS NULL finds rows with no matching right table data.
If you want all rows from the left table regardless of matches, which join do you use?
✗ Incorrect
LEFT JOIN returns all rows from the left table, matching or not.
What will happen if you replace LEFT JOIN with INNER JOIN in a query?
✗ Incorrect
INNER JOIN returns only rows where both tables have matching data.
In a LEFT JOIN, what does a NULL in the right table columns indicate?
✗ Incorrect
NULL in right table columns means no matching row was found for that left table row.
Explain how a LEFT JOIN works and why some columns might show NULL values in the result.
Think about what happens when the right table has no matching data.
You got /3 concepts.
Describe how to find rows in the left table that have no matching rows in the right table using a LEFT JOIN.
Filtering NULLs in right table columns helps find unmatched rows.
You got /3 concepts.