join question - Mailing list pgsql-novice

From Brian
Subject join question
Date
Msg-id 5.1.0.14.2.20020215181810.00ac1240@mail.attbi.com
Whole thread Raw
In response to Re: SQL Question  (Francisco Reyes <lists@natserv.com>)
Responses Re: join question  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-novice by date:

Previous
From: Francisco Reyes
Date:
Subject: Re: Upgrading to 7.2
Next
From: Tom Lane
Date:
Subject: Re: join question