Re: Outer Joins

From: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
To: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
Cc: "Poul L(dot) Christiansen" <poulc(at)cs(dot)auc(dot)dk>, Michael Dunn <michael(at)2cactus(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Outer Joins
Date: 2001-01-07 01:32:53
Message-ID: Pine.LNX.4.30.0101062023160.8905-100000@chapelperilous.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 6 Jan 2001, Robert B. Easter wrote:

> What is the syntax for this? Is there an example I can see/run?

Should follow standard SQL92 syntax (which, BTW, Oralce doesn't):

SELECT * FROM table1 LEFT OUTER JOIN table2 ON (table1.field =
table2.field)

This will return all rows from table1 even if no corresponding row exists
in table2. A RIGHT OUTER JOIN would do the opposite.

-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
It is better to have loved a short man than never to have loved a tall.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert B. Easter 2001-01-07 05:53:50 Re: Outer Joins
Previous Message Robert B. Easter 2001-01-07 01:23:53 Re: Passing tables as parameter