Bird
0
0

Why does an INNER JOIN with an ON condition exclude rows that do not have matching keys in both tables?

hard📝 Conceptual Q10 of 15
SQL - INNER JOIN
Why does an INNER JOIN with an ON condition exclude rows that do not have matching keys in both tables?
ABecause INNER JOIN returns all rows from the first table regardless of matches
BBecause INNER JOIN automatically adds NULLs for unmatched rows
CBecause INNER JOIN only returns rows where the ON condition is true, filtering out unmatched rows
DBecause INNER JOIN merges tables without any condition
Step-by-Step Solution
Solution:
  1. Step 1: Understand INNER JOIN filtering

    INNER JOIN returns only rows where the ON condition matches in both tables.
  2. Step 2: Explain exclusion of unmatched rows

    Rows without matches fail the ON condition and are excluded from the result.
  3. Final Answer:

    Because INNER JOIN only returns rows where the ON condition is true, filtering out unmatched rows -> Option C
  4. Quick Check:

    INNER JOIN filters unmatched rows by ON condition [OK]
Quick Trick: INNER JOIN excludes rows failing ON condition match [OK]
Common Mistakes:
MISTAKES
  • Thinking INNER JOIN adds NULLs for unmatched rows
  • Confusing INNER JOIN with LEFT JOIN
  • Assuming all rows are returned

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes