I have a column in my table called IsDuplicate
, nullable.
If I want to return all results where IsDuplicate
is '0' or is null, I can do
WHERE ISNULL(IsDuplicate, 0) = 0
or I can do
WHERE IsDuplicate = '0' OR IsDuplicate IS NULL
However, this never works:
WHERE NOT(IsDuplicate = '1')
Why does this not work? This should cover both IsDuplicate
equaling both '0' and NULL.