On Wed, Jun 06, 2001 at 10:44:04PM +0200, Nils Zonneveld wrote:
>
>
> Raymond Chui wrote:
> >
> > The Subject says its all.
> >
>
> Yes 'exists' works (though I never understood the advantage to the 'in' operator).
On postgres at least, exists is faster than in.
They are equivalent though.
select x from a where v in (select v from b)
select x from a where exists (select 1 from b where a.v = b.v)
select x from a, b where a.v = b.v
are all the same. Postgres doesn't quite know that yet though.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org>
http://svana.org/kleptog/