Subject RE: [firebird-support] Why NULL <> NULL ?
Author Alan McDonald
> jasajona schrieb:
> > In trigger I have:
> > --
> > if (field1 = field1) then ...
> > --
> > when field1 = null, field2 = null
> >
> > (field1 = field2) = false :(
> >
> > so I have to make an exception for null case, that is very ilogical.
>
> Often used example:
> I don't know how much money you've got in your wallet, so the value is
> NULL (unknown).
>
> You don't know how much money I've got in my wallet, so it's NULL, too.
>
> So your conclusion is that we both have the same amount of money in our
> wallets, since we both have NULL....
>
> ;-)
>
> Luc.

I've never thought of this as a good example.
I have money in my wallet - it could be nothing or it could be $5 or $10 etc
In the DB, if the field state is NULL - it NEVER has an unknown value in it
of 5 or 10 - it has no value it's state is NULL. if it has 5 or 10 in it
then it is NOT NULL.

Alan