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 is NULL on the right side.
Click to reveal answer
beginner
What does a RIGHT JOIN do in SQL?
A RIGHT JOIN returns all rows from the right table and the matching rows from the left table. If there is no match, the result is NULL on the left side.
Click to reveal answer
intermediate
When should you use LEFT JOIN instead of RIGHT JOIN?
Use LEFT JOIN when you want to keep all rows from the first (left) table and add matching data from the second (right) table. It is often easier to read and understand.
Click to reveal answer
intermediate
Can a RIGHT JOIN be rewritten as a LEFT JOIN?
Yes. A RIGHT JOIN can be rewritten as a LEFT JOIN by swapping the order of the tables. This helps keep queries consistent and easier to read.
Click to reveal answer
beginner
Why might developers prefer LEFT JOIN over RIGHT JOIN?
Developers often prefer LEFT JOIN because it reads naturally from left to right, matching the order of tables in the query. This improves clarity and reduces confusion.
Click to reveal answer
What does a LEFT JOIN return?
✗ Incorrect
LEFT JOIN returns all rows from the left table and matching rows from the right table, filling with NULLs if no match.
How can you rewrite a RIGHT JOIN as a LEFT JOIN?
✗ Incorrect
RIGHT JOIN can be rewritten as LEFT JOIN by swapping the tables' order.
Which join is usually easier to read and understand?
✗ Incorrect
LEFT JOIN is often easier to read because it follows the natural left-to-right order.
If you want all rows from the right table regardless of matches, which join do you use?
✗ Incorrect
RIGHT JOIN returns all rows from the right table and matching rows from the left.
What happens to unmatched rows in the right table when using LEFT JOIN?
✗ Incorrect
LEFT JOIN excludes unmatched rows from the right table; only unmatched left table rows appear with NULLs on the right.
Explain the difference between LEFT JOIN and RIGHT JOIN in simple terms.
Think about which table's rows you want to keep fully.
You got /4 concepts.
Describe when and why you might choose LEFT JOIN over RIGHT JOIN in a query.
Consider readability and table order.
You got /4 concepts.