2,151 views
0 0 votes

Consider the following relations:

How many number of records will be returned by the following query?

2 Answers

1 1 vote

Answer should be zero.

It is a co-related query. So for every tuple of R, we have to execute a co-related query. Condition S.E>10 is always false, and it is with and condition, so count(*) will return 0, and exist will return false to R each tuple. So 0 record will be selected.

Answer- 0 Record

0 0 votes
see count(*) will always return something and in this case returning 0.So exists return true..So thats why every tuple will get selected from table R
Position:
Show:

Related questions

0 0 votes
0 0 answers
879
879 views
amitqy asked Jan 8, 2019
879 views
I got why query 2 is wrong. How do I approach to understand Query 1, is there a generic approach for solving questions like these which have no tables given?
1 1 vote
1 1 answer
658
658 views
2 2 votes
1 answers 1 answer
649
649 views
nish kim asked Jan 19, 2018
649 views
0 0 votes
0 0 answers
997
997 views