0 votes 0 votes Databases databases sql made-easy-test-series + – Arnabi asked Jan 28, 2017 edited Mar 5, 2019 by adeebafatima1 Arnabi 375 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply nitish1995 commented Apr 7, 2017 reply Follow Share count * never returns NULL..in worst case it will return just 0. 0 votes 0 votes reena_kandari commented Jul 9, 2017 reply Follow Share Exists Returns TRUE if a subquery contains any rows. here count return an integer value not a row, so it means exists(0) will evaluate true,right? Exists is false when inner query return NULL,means no row exists? 0 votes 0 votes joshi_nitish commented Jul 9, 2017 reply Follow Share yes, if count* is in subquery of exists....exists will always return true, no matter what is the condition of selection...similiarly if count* is in subquery of notexists, it will always return false. 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes count(*) will result in zero value therfore 3 will be output and 3 record will be in final result. Sandeep Suri answered Jan 29, 2017 Sandeep Suri comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes When evaluating the subquery we will get a relation with just a single value 0 .Thus exists evaluates to true so ans is 3 ByteCode answered Nov 27, 2023 ByteCode comment Share Follow See all 0 reply Please log in or register to add a comment.