Re: So what's null then if it's not nothing?

From: Jon Heggland <>
Date: Sun, 27 Nov 2005 10:23:22 +0100
Message-ID: <>

In article <>, says...
> Jon Heggland wrote:
> > In article <>,
> > says...
> > > So, using your valuation for equality, would a query asking for a
> > > pairwise list of people living in the same country produce a correct
> > > result if some pairs that happen to have nulls for their countries ?
> >
> > That, of course, depends on what you mean by a correct result, what it
> > means that country is NULL, and how the query is formulated.
> By the correct result I mean the result that would not claim that
> people [about whose location we have no clue] live in the same place.
> Sort of obvious, no ?

Maybe, but it is important to be precise. It is not necessarily obvious that a NULL country means that we don't have a clue about a person's location.

> > If we assume that it is not generally the case that two people with
> > NULLs for their countries (speaking loosely here) live in the same
> > country, the query would simply have to be written so as to disregard
> > people with NULL country.
> So you insist that the valuation of "null=null" as true can make sense
> in some cases ? If so, what are those cases ?

I prefer to avoid NULLs altogether. But as I'm sure you know, even SQL considers NULLs equal in many circumstances.

> If not so, why do we
> need to modify our query at all ? The standard SQL does not evaluate
> null=null to true, so why bother writing the query "so as to disregard
> people with NULL country" ?

To avoid 3VL.

Received on Sun Nov 27 2005 - 10:23:22 CET

Original text of this message