Re: [HACKERS] Subselects and NOTs
| От | Vadim B. Mikheev |
|---|---|
| Тема | Re: [HACKERS] Subselects and NOTs |
| Дата | |
| Msg-id | 34EAE46F.281C6CA7@sable.krasnoyarsk.su обсуждение исходный текст |
| Ответ на | Re: [HACKERS] Subselects and NOTs (Bruce Momjian <maillist@candle.pha.pa.us>) |
| Список | pgsql-hackers |
Bruce Momjian wrote: > > > > > Is 'not X in' the same as 'X not in' ? Currently we have: > > I am not sure about this, but I believe 'not X in subselect' is > evaluated as 'not (x in subselect)' and not as 'X not in subselect'. Am > I missing something? Even 'not (x in subselect)' doesn't help in Oracle! This works just as 'x not in subselect'. Ok, if we don't know what standard say then could you test this in Informix, etc. Don't forget put NULL into table in subselect to get 'no rows selected' for 'x not in subselect'... > > Also they show: > > select * > from test > where x <> (select y > from test2) > > When test2 returns no rows, the query returns no rows because the > subquery returns a single row of NULL values. This is exactly how it works in postgres and Oracle. Vadim
В списке pgsql-hackers по дате отправления: