Bird
0
0

What does an INNER JOIN do in SQL?

easy📝 Conceptual Q11 of 15
SQL - INNER JOIN
What does an INNER JOIN do in SQL?
AIt returns all rows from the first table only.
BIt returns rows that have matching values in both tables.
CIt returns all rows from the second table only.
DIt returns all rows from both tables, matching or not.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of INNER JOIN

    INNER JOIN combines rows from two tables where the join condition matches in both tables.
  2. Step 2: Compare options with INNER JOIN behavior

    Only the description "It returns rows that have matching values in both tables." correctly states that it returns rows with matching values in both tables.
  3. Final Answer:

    It returns rows that have matching values in both tables. -> Option B
  4. Quick Check:

    INNER JOIN = matching rows only [OK]
Quick Trick: INNER JOIN returns only matching rows from both tables [OK]
Common Mistakes:
MISTAKES
  • Thinking INNER JOIN returns all rows from one table
  • Confusing INNER JOIN with LEFT or RIGHT JOIN
  • Assuming it returns unmatched rows

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes