EXISTS Keyword

From: <cnliou(at)eurosport(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: EXISTS Keyword
Date: 2001-10-04 01:18:53
Message-ID: 200110040118.3520@lh00.opsion.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello!

I vaguely remember that someone said somewhere that
EXISTS runs faster than IN:

SELECT * FROM table1 where field1 EXISTS (SELECT
field4 FROM table2)

However, all I got from version 7.1.3 is:

ERROR: parser: parse error at or near "exists"

While below works:

SELECT * FROM table1 where field1 IN (SELECT field4
FROM table2)

Any key points I have missed?

CN

--------------------------------------------------------
You too can have your own email address from Eurosport.
http://www.eurosport.com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2001-10-04 01:24:03 Re: SubQuery
Previous Message cnliou 2001-10-04 01:06:04 SubQuery