Bird
0
0

Which SQL clause is used to retrieve only the rows that exist in both of two SELECT query results?

easy📝 Conceptual Q2 of 15
SQL - Set Operations
Which SQL clause is used to retrieve only the rows that exist in both of two SELECT query results?
AINTERSECT
BUNION
CJOIN
DEXCEPT
Step-by-Step Solution
Solution:
  1. Step 1: Identify the purpose

    The question asks for rows common to both SELECT queries.
  2. Step 2: Recall SQL set operators

    INTERSECT returns common rows, UNION combines all rows, JOIN combines rows based on keys, EXCEPT returns rows in first query not in second.
  3. Final Answer:

    INTERSECT -> Option A
  4. Quick Check:

    INTERSECT finds common rows [OK]
Quick Trick: Use INTERSECT to get common rows from two queries [OK]
Common Mistakes:
MISTAKES
  • Choosing UNION which merges all rows
  • Confusing JOIN with INTERSECT
  • Using EXCEPT which excludes rows

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes