Re: Weird NOT IN condition in SELECT (PostgreSQL 7.4.3
От | Richard Huxton |
---|---|
Тема | Re: Weird NOT IN condition in SELECT (PostgreSQL 7.4.3 |
Дата | |
Msg-id | 40D995FD.3030204@archonet.com обсуждение исходный текст |
Ответ на | Weird NOT IN condition in SELECT (PostgreSQL 7.4.3 and 7.4.2 tested) (Ferruccio Zamuner <nonsolosoft@diff.org>) |
Ответы |
Re: Weird NOT IN condition in SELECT (PostgreSQL
|
Список | pgsql-hackers |
Ferruccio Zamuner wrote: > Hi, > > I've following select, and I expect to receive a single record as result > from it: > > select c.id > from copie as c > where c.enum=46857 and > c.condizio_prestito = 'A' and > c.id not in (select id_copia from testi_fermi_prenotati) and > c.id not in (select id_copia from prestiti); > > but it doesn't give me any records at all. > > > Following there is table descriptions: > > CREATE TABLE copie ( > id serial NOT NULL primary key, > CREATE TABLE prestiti ( > id_copia integer references copie(id) > CREATE TABLE testi_fermi_prenotati ( > id_copia integer NOT NULL references copie(id), Are you sure you don't have any null values in prestiti.id_copia? -- Richard Huxton Archonet Ltd
В списке pgsql-hackers по дате отправления: