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

join question

From: Brian <Brrrian(at)Excite(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: join question
Date: 2002-02-16 02:23:12
Message-ID: 5.1.0.14.2.20020215181810.00ac1240@mail.attbi.com (view raw or flat)
Thread:
Lists: pgsql-novice
What is the correct way to order the sequence join statements?

Device is the table driving this example join... it has foreign keys to the tables part and traveler.


SELECT * 
FROM Device, Part, Traveler
Where Lot = 'LotID' 

AND Part.Part_ID         = Device.Part_ID
AND Traveler.Traveler_ID = Device.Traveler_ID

-OR- do you turn around the Joins like this?

AND Device.Part_ID     = Part.Part_ID 
AND Device.Traveler_ID = Traveler.Traveler_ID

thanks for the advice.
Brian


In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2002-02-16 04:38:30
Subject: Re: join question
Previous:From: Francisco ReyesDate: 2002-02-15 21:03:42
Subject: Re: Upgrading to 7.2

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