Bird
0
0

What does a CROSS JOIN do in SQL?

easy📝 Conceptual Q11 of 15
SQL - Advanced Joins
What does a CROSS JOIN do in SQL?
AIt returns all possible combinations of rows from two tables.
BIt returns only matching rows based on a condition.
CIt deletes rows from both tables.
DIt updates rows in one table based on another.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the definition of CROSS JOIN

    A CROSS JOIN combines every row from the first table with every row from the second table, creating all possible pairs.
  2. Step 2: Compare with other join types

    Unlike INNER JOIN or LEFT JOIN, CROSS JOIN does not require a matching condition and returns the Cartesian product.
  3. Final Answer:

    It returns all possible combinations of rows from two tables. -> Option A
  4. Quick Check:

    CROSS JOIN = all combinations [OK]
Quick Trick: CROSS JOIN = multiply rows from both tables [OK]
Common Mistakes:
MISTAKES
  • Confusing CROSS JOIN with INNER JOIN
  • Thinking CROSS JOIN filters rows
  • Assuming CROSS JOIN deletes or updates data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes