Re: 2 tables, joins and same name... - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: 2 tables, joins and same name...
Date
Msg-id Pine.LNX.4.33L2.0109010441460.6190-100000@aguila.protecne.cl
Whole thread Raw
In response to Re: 2 tables, joins and same name...  (Jeff Davis <list-pgsql-general@dynworks.com>)
List pgsql-general
On Fri, 31 Aug 2001, Jeff Davis wrote:

> Whew... a little complex. I think I know what you are trying to do.

What's wrong with something like

select airport1.name as departure, airport2.name as arrival from
destination, airport as airport1, airport as airport2 where
airport1.airport_id=airport_dep_id and
airport2.airport_id=airport_arr_id;

?

Maybe I'm overlooking something, but it seems pretty straightforward to
me.

--
Alvaro Herrera (<alvherre[@]atentus.com>)


pgsql-general by date:

Previous
From: bj@zuto.de (Rainer Clasen)
Date:
Subject: Re: select a random record
Next
From: Tod McQuillin
Date:
Subject: Re: select a random record