Subject Re: [firebird-support] FB 2.0: column = NULL
Author Paul Vinkenoog
Hi Björn,

> I know there is a new feature in fb 2.0 which makes expressions like
> column = NULL
> valid!

It's not really a feature. It's a syntax relaxation, and as a rule you
shouldn't use it. It just gives you more rope to hang yourself.

> 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!

That is as designed. The syntax is valid, but you should never use it
as a null test. '<bla> = null' always returns null, so the row in
question isn't included.

Please have a look at these sections of the Null Guide:

http://www.firebirdsql.org/manual/nullguide-langelem.html#nullguide-langelem-isnull
http://www.firebirdsql.org/manual/nullguide-langelem.html#nullguide-langelem-literal


Hope this helps,
Paul Vinkenoog

[Non-text portions of this message have been removed]