oracle - Difference of NOT IN and NOT EQUALS different behaviour in SQL query -
oracle - Difference of NOT IN and NOT EQUALS different behaviour in SQL query -
i thought not in behaves same != in query. query using != returns more rows query using not in:
select count(a.no) a.code != 'a' , a.code != 'b' , a.code != 'c' , a.name != 'd' , a.name != 'e' returns 1566 rows, whereas
select count(a.no) a.code not in ('a','b','c') , a.name not in ('d','e') returns 1200 rows.
i suppose not in excludes null values - difference?
i have tried replecate problem using this simplified sql fiddle, however, returns same number both versions.
what differant data?
sql oracle
Comments
Post a Comment