5 votes 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 asked Dec 28, 2014 edited Jan 24, 2016 by makhdoom ghaya Vikrant Singh 761 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 10 votes 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 See all 4 4 Comments reply Vikrant Singh commented Dec 29, 2014 reply Follow Share Is "in null" or "not in null" both evaluates to unknown? 0 votes 0 votes shree commented Dec 29, 2014 reply Follow Share 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 votes 4 votes Vikrant Singh commented Dec 29, 2014 reply Follow Share thanks @Shree 0 votes 0 votes Akash Kanase commented Dec 11, 2015 reply Follow Share 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 votes 1 votes Please log in or register to add a comment.