Subject Re: [firebird-support] null in triggers
Author Paul Vinkenoog
Hello Alexandre,

>> You can make this shorter:
>>
>> if not ( New.Quantity = Old.Quantity
>> or
>> New.Quantity is null and Old.Quantity is null )

> Sometimes (or in almost all cases) I try to make the code more
> readable so I don't even tried to reduce the boolean sentence, of
> course your sugestion is shorter and more elegant, but I think it
> does not show in a first glance what it is supposed to do (since it
> inverts the original question)...

You're right. But you can make it clearer for yourself if you think of
it as

if not ( fields are equal )

That's what I sometimes do.

> By the way, Firebird does complete boolean evaluation ?

If I remember correctly: yes, since InterBase times. Maybe it's even
in the SQL spec.? I also remember reading a thread (in Firebird-
devel?) about a new config option to turn complete boolean evalution
off.


Greetings,
Paul Vinkenoog