Redirected
820 views
0 votes
0 votes

Consider the following relations:

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

2 Answers

1 votes
1 votes

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 votes
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

Related questions

0 votes
0 votes
0 answers
1
amitqy asked Jan 8, 2019
496 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 votes
1 votes
1 answer
2
2 votes
2 votes
1 answer
3
nish kim asked Jan 19, 2018
408 views
0 votes
0 votes
0 answers
4