Database-Management-System
March 30, 2024Duality
March 30, 2024GATE 2012
|
Question 51
|
Consider the following relations A, B, C.

How many tuples does the result of the following SQL query contain?
SELECT A.id
FROM A
WHERE A.age > ALL (SELECT B.age
FROM B
WHERE B. name = "arun")
|
4
|
|
|
3
|
|
|
0
|
|
|
1
|
Question 51 Explanation:
First query (2) will be executed and 0 (no) rows will be selected because in relation B there is no Name ‘Arun’.
The outer query (1) results the follow and that will be the result of entire query now. (Because inner query returns 0 rows).
Correct Answer: B
Question 51 Explanation:
First query (2) will be executed and 0 (no) rows will be selected because in relation B there is no Name ‘Arun’.
The outer query (1) results the follow and that will be the result of entire query now. (Because inner query returns 0 rows).
