Bird
0
0

Which of the following best describes the number of rows returned by a CROSS JOIN of a table with 3 rows and another with 4 rows?

easy📝 Conceptual Q2 of 15
PostgreSQL - Joins in PostgreSQL
Which of the following best describes the number of rows returned by a CROSS JOIN of a table with 3 rows and another with 4 rows?
A7 rows
B4 rows
C12 rows
D3 rows
Step-by-Step Solution
Solution:
  1. Step 1: Calculate rows from each table

    The first table has 3 rows, and the second has 4 rows.
  2. Step 2: Multiply rows for CROSS JOIN

    CROSS JOIN returns the Cartesian product, so total rows = 3 * 4 = 12.
  3. Final Answer:

    12 rows -> Option C
  4. Quick Check:

    Rows after CROSS JOIN = 3 * 4 = 12 [OK]
Quick Trick: Multiply row counts of both tables for CROSS JOIN result [OK]
Common Mistakes:
  • Adding row counts instead of multiplying
  • Confusing with INNER JOIN row counts
  • Ignoring one table's row count

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes