Re: IN selection issues - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: IN selection issues
Date
Msg-id Pine.LNX.4.44.0301240040510.789-100000@localhost.localdomain
Whole thread Raw
In response to IN selection issues  (Jérôme Calais <jerome.calais@arunix.fr>)
List pgsql-bugs
Jérôme Calais writes:

> delete from status where status_id not in (select distinct status_id
> from company);
>
> "status_id" is a foreign key in "company".
>
> It does not delete any records from status table whereas it should
> because the sub query returns some records.

There are probably null values in the result set of the subselect.

--
Peter Eisentraut   peter_e@gmx.net

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgres 7.3 in PPC
Next
From: Tom Lane
Date:
Subject: Re: IN selection issues