Multiple choice technology databases

There are 10 rows in Table A and 0 Rows in table B. Select * from A,B How many rows will be retrieved.

  1. 1

  2. 0

  3. 10

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

A cross join (cartesian product) between tables A and B produces rows equal to (rows in A) × (rows in B). With 10 rows in A and 0 rows in B, the result is 10 × 0 = 0 rows. When one table is empty, the cross join returns an empty result set.