Re: difference between EXCEPT and NOT IN?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: difference between EXCEPT and NOT IN?
Дата
Msg-id 20080401085733.F16796@megazone.bigpanda.com
обсуждение исходный текст
Ответ на difference between EXCEPT and NOT IN?  ("Raphael Bauduin" <rblists@gmail.com>)
Ответы Re: difference between EXCEPT and NOT IN?  ("Raphael Bauduin" <rblists@gmail.com>)
Список pgsql-sql
On Tue, 1 Apr 2008, Raphael Bauduin wrote:

> The 2 following statements don't give the same result. I expected the
> second ti give the exact same result as the first one.

If any entree_id can be NULL they aren't defined to give the same result.

EXCEPT is defined in terms of duplicates based on distinctness, and for
example (1 is distinct from 1) is false, (1 is distinct from NULL) is true
and (NULL is distinct from NULL) if false.

NOT IN is defined in terms of equality, and for example, (1=1) is true,
(1=NULL) is unknown and (NULL=NULL) is unknown.


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

Предыдущее
От: "Raphael Bauduin"
Дата:
Сообщение: difference between EXCEPT and NOT IN?
Следующее
От: "Raphael Bauduin"
Дата:
Сообщение: Re: difference between EXCEPT and NOT IN?