Table Colour(c) has rows ‘red’, ‘blue’. Table Size(s) has rows ‘S’, ‘M’, ‘L’. SELECT COUNT(*) FROM Colour CROSS JOIN Size; What is the result?
Correct answer C. 6
Explanation
A CROSS JOIN is the Cartesian product: every row of the first table is paired with every row of the second, so the row count is 2 x 3 = 6. There is no join condition to filter pairs. The answer 5 adds the counts instead of multiplying them, which would describe UNION ALL of two single-column results, not a join.
Answer checked How we write and check questions
Discussion