Bird
0
0

What happens to rows in the left table when there is no matching row in the right table in a LEFT JOIN?

easy📝 Conceptual Q1 of 15
SQL - LEFT and RIGHT JOIN
What happens to rows in the left table when there is no matching row in the right table in a LEFT JOIN?
AThey cause an error
BThey are excluded from the result
CThey appear with NULL values for the right table columns
DThey are duplicated
Step-by-Step Solution
Solution:
  1. Step 1: Understand LEFT JOIN behavior

    A LEFT JOIN returns all rows from the left table and matching rows from the right table.
  2. Step 2: Consider unmatched rows

    If no match exists, the right table columns show NULL for those left table rows.
  3. Final Answer:

    They appear with NULL values for the right table columns -> Option C
  4. Quick Check:

    LEFT JOIN unmatched rows = NULL in right table columns [OK]
Quick Trick: LEFT JOIN keeps all left rows, fills right with NULL if no match [OK]
Common Mistakes:
MISTAKES
  • Thinking unmatched rows are removed
  • Assuming unmatched rows cause errors
  • Believing unmatched rows duplicate

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes