Subject ? IS NULL
Author Ann W. Harrison
For those of you who don't follow the DEVEL list and missed the
discussion, I raised the question of

> UPDATE SIMPLENAME SET PKEY = ?, FNAME = ?
WHERE ((? IS NULL AND PKEY IS NULL) OR PKEY = ?)
AND ((? IS NULL AND FNAME IS NULL) OR FNAME = ?)
>

The answer is that Firebird2 includes a new comparison operation

IS [NOT] DISTINCT FROM

The operator is defined in the SQL 03 standard as meaning - in it's
positive sense, that one of the operands (but not both) is null or the
two operands have different values.

We already [in V2] support standard SQL construction for it:

UPDATE SIMPLENAME SET PKEY = ?, FNAME = ?
WHERE (PKEY IS NOT DISTINCT FROM ?)
AND (FNAME IS NOT DISTINCT FROM ?)


So, that seems to be the answer...


Regards,


Ann