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