Bird
0
0

What does a CROSS JOIN do in PostgreSQL?

easy📝 Conceptual Q11 of 15
PostgreSQL - Joins in PostgreSQL
What does a CROSS JOIN do in PostgreSQL?
APairs every row from the first table with every row from the second table.
BReturns only matching rows based on a condition.
CJoins tables based on a common column with duplicates removed.
DFilters rows from the first table that exist in the second table.
Step-by-Step Solution
Solution:
  1. Step 1: Understand CROSS JOIN concept

    A CROSS JOIN creates combinations of all rows from both tables without any condition.
  2. Step 2: Compare with other JOIN types

    Unlike INNER JOIN or LEFT JOIN, CROSS JOIN does not filter or match rows but pairs all possible combinations.
  3. Final Answer:

    Pairs every row from the first table with every row from the second table. -> Option A
  4. Quick Check:

    CROSS JOIN = all combinations [OK]
Quick Trick: Remember: CROSS JOIN multiplies rows from both tables [OK]
Common Mistakes:
  • Confusing CROSS JOIN with INNER JOIN
  • Thinking CROSS JOIN filters rows
  • Assuming CROSS JOIN requires a join condition

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes