Consider the following two tables 'A' and 'B'.
A
Name RollNo Marks amit 1 10 vinit NULL 20 punit 3 37
B
RollNo MobileNo Address 1 91 Kushinagar 2 92 Murthal 3 93 Churu 4 98 Deoria
The Cartesian Product of table 'A' and table 'B' shows ________ rows as NULL values.
Consider the following two tables 'A' and 'B'.
A
| Name | RollNo | Marks |
|---|---|---|
| amit | 1 | 10 |
| vinit | NULL | 20 |
| punit | 3 | 37 |
B
| RollNo | MobileNo | Address |
|---|---|---|
| 1 | 91 | Kushinagar |
| 2 | 92 | Murthal |
| 3 | 93 | Churu |
| 4 | 98 | Deoria |
The Cartesian Product of table 'A' and table 'B' shows ________ rows as NULL values.
Solution
✅ Correct Option: 2
The Cartesian product pairs every row of A with every row of B, so it has rows in total.
Only the row (vinit, NULL, 20) in A contains a NULL. It is paired with each of the 4 rows of B, so the NULL RollNo appears in rows of the result.
Option 1: 12 is the total number of rows in the product, not the number of rows containing NULL.
Option 4: there is one NULL in table A, but it is repeated once for every row of B.
Related questions:
2026: 24 May Shift 1
2025: 15 May Shift 2
2025: 3 June Shift 2
2025: 14 May Shift 1