From: Brook Milligan <brook@trillium.NMSU.Edu>
To: pgsql-sql@postgreSQL.org
Subject: IN and subselects
Date: Mon, 29 Jun 1998 16:28:03 -0600 (MDT)
Message-ID: <199806292228.QAA05019@trillium.nmsu.edu> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: brook@trillium.NMSU.Edu
Subject: Re: IN and subselects
In-Reply-To: <199806292228.QAA05019@trillium.nmsu.edu>
References: <199806292228.QAA05019@trillium.nmsu.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox