Bird
0
0

What is the effect of performing a CROSS JOIN between two tables Table1 and Table2 in SQL?

easy📝 Conceptual Q1 of 15
SQL - Advanced Joins
What is the effect of performing a CROSS JOIN between two tables Table1 and Table2 in SQL?
AIt returns only matching rows based on a common column.
BIt returns every combination of rows from both tables.
CIt returns rows from the first table excluding those in the second.
DIt returns rows from the second table excluding those in the first.
Step-by-Step Solution
Solution:
  1. Step 1: Understand CROSS JOIN

    A CROSS JOIN produces the Cartesian product of two tables, meaning every row from the first table is paired with every row from the second table.
  2. Step 2: Analyze the options

    It returns every combination of rows from both tables. correctly describes this behavior. Options B, C, and D describe other types of joins or operations.
  3. Final Answer:

    It returns every combination of rows from both tables. -> Option B
  4. Quick Check:

    Cartesian product means all combinations [OK]
Quick Trick: CROSS JOIN pairs all rows from both tables [OK]
Common Mistakes:
MISTAKES
  • Confusing CROSS JOIN with INNER JOIN
  • Assuming CROSS JOIN filters rows
  • Thinking CROSS JOIN returns only matching rows

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes