From Null (SQL)
Misunderstanding of how Null works is
the cause of a great number of errors
in SQL code, both in ISO standard SQL
statements and in the specific SQL
dialects supported by real-world
database management systems. These
mistakes are usually the result of
confusion between Null and either 0
(zero) or an empty string (a string
value with a length of zero,
represented in SQL as ''). Null is
defined by the ISO SQL standard as
different from both an empty string
and the numerical value 0, however.
While Null indicates the absence of
any value, the empty string and
numerical zero both represent actual
values.
Also from SET ANSI_NULLS
When SET ANSI_NULLS is OFF, the Equals
(=) and Not Equal To (<>) comparison
operators do not follow the SQL-92
standard. A SELECT statement using
WHERE column_name = NULL returns the
rows with null values in column_name.
A SELECT statement using WHERE
column_name <> NULL returns the rows
with nonnull values in the column. In
addition, a SELECT statement using
WHERE column_name <> XYZ_value returns
all rows that are not XYZ value and
that are not NULL.