1 votes 1 votes consider the following table A B 1 NULL 2 1 3 2 4 2 SELECT * FROM R AS R1 WHERE NOT EXISTS (SELECT * FROM R WHERE B=R1.A); NO OF TUPLE RETURNED BY THE QUERY IS ------------------------- dushyantsingh asked Jul 8, 2017 dushyantsingh 316 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply joshi_nitish commented Jul 8, 2017 reply Follow Share 2 ?? 0 votes 0 votes dushyantsingh commented Jul 8, 2017 reply Follow Share plz explain it ? 0 votes 0 votes joshi_nitish commented Jul 8, 2017 reply Follow Share comparison with null are NULL and are ignored...NOT EXISTS return false when any tupple is seleced by sub query... for A=1,2 tupples will be selected...and for 3,4 comparison with NULL will be ignored and nothing will be selected... 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes Answer would be. A B 3 2 4 2 I have tested it see this : http://sqlfiddle.com/#!9/8e4c95/1 chandan sahu answered Jan 28, 2019 chandan sahu comment Share Follow See all 0 reply Please log in or register to add a comment.