Joined February 2013

Brad Christie

Solution Architect at The Rapid Group
Solution Architect
The Rapid Group
New Hampshure, USA

Posted to Stay away from NULL over 1 year ago

That's because most DBMSs require that you check @var IS NULL and [conversely] @var IS NOT NULL. NULL isn't what you think it is in a database; it's more of a flag than a value.

This isn't anything new, just be aware you should always use IS or IS NOT when comparing a NULL.

p.s. MySQL (of reference) has explicit documentation for is null & is not null. MSDN does something similar with a whole page on null comparison.

50 Karma
0 Total ProTip Views