Subject RE: [firebird-support] NULL and equality
Author Helen Borrie
At 12:02 AM 29/05/2004 +1000, you wrote:
> >
> > > I always know that you can't compare NULL to anything but I
> > must say it's
> > > just a little ambiguous to have say
> > > update table set field=NULL
> > > instead of
> > > update table set field to null
>
>agreed - it's assignment...
>
>is it null?
>is it the same as null?
>is it what I expect when I expect null?
>is it equal to what I expect when I expect null?
>is it null?
>but it's not equal to null when I know it's null, it's just null
>and it's not equal to null when I know it has a null state and does not have
>a value, it's just null

Those are all invalid questions, since an assignment operator doesn't do
any comparisons. It just assigns something to a variable.

>when does popular expectation or vernacular finally get the better of a
>standard written eons ago?
>we can test equality to null in most prgramming languages but not still in
>SQL.

Repeat, assignment doesn't test equality. And an equality test against
null is nonsensical, hence the result of such a test is "null", which is
shorthand for "I don't have a clue".

/hb