Skip site navigation (1) Skip section navigation (2)

Re: Possible use of a subselect?

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Manfred Koizar <mkoi-pg(at)aon(dot)at>
Cc: "Adam Erickson" <adamre(at)cox(dot)net>,"Pgsql-Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Possible use of a subselect?
Date: 2002-05-27 07:53:41
Message-ID: b7p3fuo6e36bsrcj5ln3snpet0o2f94882@4ax.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Mon, 27 May 2002 09:44:50 +0200, I wrote:

>SELECT e.id, e.content, k.content
>FROM string e LEFT JOIN string k
>    ON e.id = k.stringid
>WHERE e.stringid = 0 AND k.language = 'Korean';
>
>HTH. 
No, that doesn't help.  The "k.language = 'Korean'" part belongs into
the ON clause.  Having it in the WHERE clause makes the statement
behave like an INNER JOIN.  So Joel's answer was not only faster, but
definitely better, too.

Servus
 Manfred

In response to

pgsql-novice by date

Next:From: John TaylorDate: 2002-05-27 10:14:55
Subject: Full Outer Joins
Previous:From: Manfred KoizarDate: 2002-05-27 07:44:50
Subject: Re: Possible use of a subselect?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group