| От | 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?
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера