Subject Re: [firebird-support] FB 2.0: column = NULL
Author Michael Weissenbacher
Hi,
> I know there is a new feature in fb 2.0 which makes expressions like
>
> column = NULL
>
> valid!
>
> But:
>
> If I have a table PERSONS: e.g.
>
>
> Id Name
> ----------
> 0 Hans
> 1 <NULL>
> 2 Someone
>
> and I submit
> SELECT * FROM PERSONS WHERE "Name" IS NULL;
> record Id=1 is returned.
>
> With
> SELECT * FROM PERSONS WHERE "Name" = NULL;
> no record is returned but also no error message!

Per the SQL-Standard this is actually correct. Think of NULL not as a
value, but a state, meaning "unknown". Therefor <anything>=NULL will
always return NULL. Because NULL isn't true, you'll always get an empty
result set.

Michael