4 ms·
Precisely my point. Nothing equals null, but SQL server allows queries that use '= NULL' in them.
by stoolpigeon 15y ago
Precisely my point. Nothing equals null, but SQL server allows queries that use '= NULL' in them.
- jrockway 15y agoBut that doesn't prevent = NULL from parsing into an AST containing the "IS NULL" opcode. It's syntax sugar.
- dspillett 15y agoOnly if you explicitly turn the ANSI_NULLs option off, IIRC more conformant behaviour has been the default since at least version 7. Of course it does still have irritations like trailing spaces not being considered significant in string comparisons (to pluck a random example from the air) but so do other databases, especially those that have been around many years so have their on legacy to be backwardly compatible with lest the users revolt, including Oracle (empty strings being considered NULL for instance).