1 votes 1 votes Can you please provide an elaborate explanation? Databases made-easy-test-series databases sql + – Nikita Moghe asked Jan 21, 2016 edited Mar 5, 2019 by akash.dinkar12 Nikita Moghe 583 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 5 votes 5 votes EXISTS return false if its input is $\emptyset$. In the given query, input to EXISTS is COUNT(*) which returns an integer value $\geq 0$, but never NULL. So, EXISTS always returns TRUE here and we get 3 rows in output. Arjun answered Jan 22, 2016 selected Jan 23, 2016 by Nikita Moghe Arjun comment Share Follow See 1 comment See all 1 1 comment reply Nikita Moghe commented Jan 23, 2016 reply Follow Share Thank you so much! 1 votes 1 votes Please log in or register to add a comment.
1 votes 1 votes In exists query we need to select an attribute but in above it is count(*) so no exists is taken it is executed as normal query which doesn't contain where condition so then it results all the 3 tuples shivanisrivarshini answered Jan 21, 2016 shivanisrivarshini comment Share Follow See 1 comment See all 1 1 comment reply Nikita Moghe commented Jan 23, 2016 reply Follow Share Thank you 0 votes 0 votes Please log in or register to add a comment.