Multiple outer join on same table

From: Marco Lazzeri <marcomail(at)noze(dot)it>
To: pgsql-sql(at)postgresql(dot)org
Subject: Multiple outer join on same table
Date: 2004-02-09 18:12:13
Message-ID: 1076350332.31616.45.camel@macbeth.intranet.noze.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi!
I'm searching a better (quicker) way to retrieve data as I used to do
using the following query...

==
SELECT
main.codice,
other.value AS value_one,
other.value AS value_two
FROM main LEFT OUTER JOIN other ON main.id =
other.id_main
LEFT OUTER JOIN other AS other2 ON main.id =
other2.id_main
WHERE
other.type = 'type_one'
AND other2.type = 'type_two';
==

Thanks,
Marco

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christian Hergert 2004-02-09 19:49:08 umlimited arguments on function
Previous Message Mark Gibson 2004-02-09 17:42:25 Re: Implementation of a bag pattern using rules