I always asked myself this: Why should we use IS NOT NULL
instead of <> NULL
?
For when I do as in the second case, no result is found.
Example:
SELECT * FROM tabela WHERE campo IS NOT NULL
Displays all rows, except when campo
is not null.
Example:
SELECT * FROM tabela WHERE campo <> NULL
Does not display anything.
Comment : The first time I tried to make this comparison was !=
and it did not work either. Because the functionality of these operators are similar.