To be clear I understand why it technically doesn't work as it's following the behavior defined in the ANSI spec. But what I don't understand is why this is a desirable behavior. Further, the existence of IS NULL
, to me at least, seems like a kludge to fix the fact that @x = null
is always false.
So why would you want to design a language such that checking if anything equals null fails and forcing users to use IS NULL
instead? Besides legacy compatibility what would be a scenario where checking if a field or parameter = null would lead to ambiguous or erroneous results?