5 5 votes A relational table Employee (ENo, EName, Dept) has $88$ number of tuples. What will be the result of following SQL statement? SELECT COUNT (ENo) FROM Employee WHERE ENo NOT IN (NULL); $88$ $44$ $0$ $87$ Databases sql databases + – Vikrant Singh 1.3k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 10 10 votes Where E_no not in NULL - the predicate evaluates to unknown. so no rows will be printed. shree answered Dec 28, 2014 • selected May 19, 2015 by Rajarshi Sarkar shree comment Share Follow See all 4 Comments 4 4 Comments reply Vikrant Singh commented Dec 29, 2014 reply Follow flag Is "in null" or "not in null" both evaluates to unknown? 0 0 replyShare shree commented Dec 29, 2014 reply Follow flag comparisons with Null can never result in either True or False, but always in a third logical result, Unknown.. check here http://en.wikipedia.org/wiki/Null_%28SQL%29#Comparisons_with_NULL_and_the_three-valued_logic_.283VL.29 4 4 replyShare Vikrant Singh commented Dec 29, 2014 reply Follow flag thanks @Shree 0 0 replyShare Akash Kanase commented Dec 11, 2015 reply Follow flag IN is translates to an iterated version of equality over the argument set and 1<>NULL is Unknown, just a as 1=NULL is Unknown. 1 1 replyShare Please log in or register to add a comment.