Bird
0
0

What is the main reason to use INTERSECT in SQL?

easy📝 Conceptual Q2 of 15
SQL - Set Operations
What is the main reason to use INTERSECT in SQL?
ATo combine all rows from two queries including duplicates
BTo find rows common to two query results
CTo remove rows from a table
DTo sort query results
Step-by-Step Solution
Solution:
  1. Step 1: Define INTERSECT operation

    INTERSECT returns only the rows that appear in both query results.
  2. Step 2: Contrast with other operations

    UNION combines all rows, DELETE removes rows, and ORDER BY sorts results.
  3. Final Answer:

    To find rows common to two query results -> Option B
  4. Quick Check:

    INTERSECT finds common rows = True [OK]
Quick Trick: INTERSECT returns only shared rows between queries [OK]
Common Mistakes:
MISTAKES
  • Confusing INTERSECT with UNION
  • Thinking INTERSECT deletes data
  • Assuming INTERSECT sorts results

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes