IN and subselects - Mailing list pgsql-sql

From Brook Milligan
Subject IN and subselects
Date
Msg-id 199806292228.QAA05019@trillium.nmsu.edu
Whole thread Raw
List pgsql-sql
I am having problems getting IN in WHERE clauses to work together with
subselects.  That is, I want to do something like

     select * from a where a.id in (select id from b where b.n = 7);

The typical outcome is that no rows are selected even though some
match the criterion.  Doing the equivalent EXISTS condition will often
work, but I cannot always get it to work.

Is there a known problem with using IN?

Thanks for your help.

Cheers,
Brook

pgsql-sql by date:

Previous
From: James Olin Oden
Date:
Subject: Re: [SQL] Finding strings inside a field...
Next
From: Zsolt Varga
Date:
Subject: Re: [SQL] Finding strings inside a field...