In SQL server if you have nullParam=NULL
in a where clause, it always evaluates to false. This is counterintuitive and has caused me many errors. I do understa
The question:
Does one unknown equal another unknown?
(NULL = NULL)
That question is something no one can answer so it defaults to true or false depending on your ansi_nulls setting.
However the question:
Is this unknown variable unknown?
This question is quite different and can be answered with true.
nullVariable = null is comparing the values
nullVariable is null is comparing the state of the variable