0 votes 0 votes How many rows will be there in the output of the following query? Databases databases test-series + – reena_kandari asked Jan 12, 2017 reena_kandari 354 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes The second query always returns 0. Thus, the table returned by second query consists of 1 tuple. Now, exists( table containing single tuple)= true for every employee of 1st relation. Thus, bove query will return all the tuples of the 1st relation. Sushant Gokhale answered Jan 14, 2017 Sushant Gokhale comment Share Follow See all 2 Comments See all 2 2 Comments reply reena_kandari commented Jan 18, 2017 reply Follow Share So it means that whenever we have an internal query consisting of count() then in case of exists we will always get all tuples because count always return an integer value. plz varify? 0 votes 0 votes Sushant Gokhale commented Jan 19, 2017 reply Follow Share Yes, I suppose that count() will always return an integer. But, today I will execute the query and let you know the actual outcome. 1 votes 1 votes Please log in or register to add a comment.