Subject | Re: Odp: [firebird-support] Bug? Come back |
---|---|
Author | Kjell Rilbe |
Post date | 2014-05-07T08:16:37Z |
liviuslivius@... skriver:
Think of "NULL" as "UNKNOWN" and add that if the value is forced to
true/false NULL evaluates to false, the logic becomes rather intuitive:
1. "if NULL then 1 else 2 end" returns 2
2. "if not NULL then 1 else 2 end" returns 2 because "not NULL" is NULL
and the expression degenerates to the same as example 1 above.
Regards,
Kjell
>What do you mean with that last line "Not (NULL -> NULL)"?
> Hi,
>
> I back with this question. Is this really correct because after
> discussion with team i have now doubt.
>
> We have here parenthesis. Any expression in parenthesis should be
> first calculated
> Then this is not test
> NOT NULL - > NULL only
> Not ( NULL -> NULL)
>
Think of "NULL" as "UNKNOWN" and add that if the value is forced to
true/false NULL evaluates to false, the logic becomes rather intuitive:
1. "if NULL then 1 else 2 end" returns 2
2. "if not NULL then 1 else 2 end" returns 2 because "not NULL" is NULL
and the expression degenerates to the same as example 1 above.
Regards,
Kjell