Bird
0
0

What does a LEFT JOIN do in SQL?

easy📝 Conceptual Q11 of 15
SQL - LEFT and RIGHT JOIN
What does a LEFT JOIN do in SQL?
ADeletes rows from the left table that have no match in the right table.
BKeeps only rows that have matches in both tables.
CKeeps all rows from the right table and adds matching rows from the left table.
DKeeps all rows from the left table and adds matching rows from the right table or NULL if no match.
Step-by-Step Solution
Solution:
  1. Step 1: Understand LEFT JOIN behavior

    A LEFT JOIN returns all rows from the left table regardless of matches in the right table.
  2. Step 2: Check what happens with unmatched rows

    If there is no matching row in the right table, the result shows NULL for right table columns.
  3. Final Answer:

    Keeps all rows from the left table and adds matching rows from the right table or NULL if no match. -> Option D
  4. Quick Check:

    LEFT JOIN = all left rows kept [OK]
Quick Trick: Remember: LEFT JOIN keeps all left rows, fills right with NULL if no match [OK]
Common Mistakes:
MISTAKES
  • Confusing LEFT JOIN with INNER JOIN
  • Thinking it keeps all right table rows
  • Assuming unmatched rows are dropped

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes