Joins

From: Russell Shaw <rjshaw(at)iprimus(dot)com(dot)au>
To: pgsql-novice(at)postgresql(dot)org
Subject: Joins
Date: 2004-02-02 15:46:41
Message-ID: 401E70E1.2020100@iprimus.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
I'm trying to get a list of all the rows in the Parts table, with
the integer indexes of man_id, case_id, and desc_id, replaced with text
from their respective tables. In the Parts table, any of man_id, case_id,
and desc_id may be absent:

Table1, Parts:

part man_id case_id desc_id
------------------------------
text int int int

Table2: Manufacturers:

man_id manufacturer
--------------------
int text

Table3, Cases:

case_id case
-------------
int text

Table4, Descriptions:

desc_id description
--------------------
int text

Is this right? :

SELECT part, manufacturer, case, description
FROM parts LEFT OUTER JOIN manufacturers, cases, descriptions
NATURAL

Responses

  • Re: Joins at 2004-02-03 22:48:55 from Nabil Sayegh

Browse pgsql-novice by date

  From Date Subject
Next Message Rob Mosher 2004-02-02 16:21:55 Inserting a Null date.
Previous Message Iandé Coutinho 2004-02-02 14:25:56 Encrypting and compiling