Re: Is NULL equal to NULL or not?

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Is NULL equal to NULL or not?
Дата
Msg-id Pine.LNX.4.44.0212091516430.31345-100000@appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Is NULL equal to NULL or not?  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список pgsql-general
On Mon, 9 Dec 2002, scott.marlowe wrote:

> > I've noticed that
> >         select NULL=NULL;
> > yields TRUE. It is also possible to select rows in this manner.
>
> That's NOT because null EQUALS null, but because it allowed you to assign
> one null value to another.  which technically can be done, so it came out
> true.

  This is a common misuderstanding. NULL means indeterminant, not zero or
missing. Since NULL is and unknown value there's no way to compare it with
another unknown value. You are absolutely correct in that the syntax 'are
both values unknown' equates to NULL is NULL while there is no meaning to
NULL=NULL.

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com
                         http://www.appl-ecosys.com/


В списке pgsql-general по дате отправления:

Предыдущее
От: Mike Mascari
Дата:
Сообщение: Re: Is NULL equal to NULL or not?
Следующее
От: "Robert Fitzpatrick"
Дата:
Сообщение: Re: Field sizes and structure