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?
AReturns only rows that have matching values in both tables
BReturns all rows from the left table and matching rows from the right table, NULL if no match
CReturns all rows from the right table and matching rows from the left table
DReturns rows only from the left table without any matching
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 when no match exists

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

    Returns all rows from the left table and matching rows from the right table, NULL if no match -> Option B
  4. Quick Check:

    LEFT JOIN = all left rows + matched right rows [OK]
Quick Trick: LEFT JOIN keeps all left rows, fills right with NULL if no match [OK]
Common Mistakes:
MISTAKES
  • Confusing LEFT JOIN with INNER JOIN
  • Thinking LEFT JOIN returns only matching rows
  • Assuming NULLs never appear in results

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes