is NULL = NULL true or false?

Поиск
Список
Период
Сортировка
От Gene Selkov, Jr.
Тема is NULL = NULL true or false?
Дата
Msg-id 199811091757.LAA03182@antares.mcs.anl.gov
обсуждение исходный текст
Список pgsql-general
Hi,

I am joining two or more tables on the column that has quite a number
of nulls, assuming 'a.key = b.key' to be a valid expression even when
both operands are NULLs. The result set is way smaller that I
expect. Could that be because the two NULLs do not match?

I guess there are two possible ways to treat the NULL = NULL
problem. One is to say, "Don't know. There is no information to say
whether this is true or false". The second is to say, "Yes, these two
entities are the same. They are equally undetermined".

The function I want to achieve is:

'a.key = b.key' OR ((a.key IS NULL) AND (b.key IS NULL))

Isn't it the way it's wired?


--Gene

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

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: Re: [GENERAL] Incrementing a Serial Field
Следующее
От: David Hartwig
Дата:
Сообщение: Re: [GENERAL] postgreSQL 6.3.2 and AIX