DBMS - Q & A and Doubt Clearance


#1

This thread is to discuss DBMS questions and doubts.Please post all your questions and answers related to OS in this thread.


#2

Table A
Id Name Age

12 Arun 60
15 Shreya 24
99 Rohit 11

Table B
Id Name Age

15 Shreya 24
25 Hari 40
98 Rohit 20
99 Rohit 11

Table C
Id Phone Area

10 2200 02
99 2100 01

Consider the above tables A, B and C. How many tuples does the result of the following SQL query contains?

SELECT A.id
FROM A
WHERE A.age > ALL (SELECT B.age
FROM B
WHERE B. name = “arun”)

a) 4
b)0
c)1
d)3


#3

answer-3
Inner query will return 0 as there is no name called ‘arun’ in table B. So all the id’s from table A is selected into the output.