Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3UJ60312988 for ; Mon, 30 Apr 2001 15:06:00 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f3UJ5bR17691; Mon, 30 Apr 2001 15:05:37 -0400 (EDT) To: Constantin Teodorescu cc: PostgreSQL Interfaces Subject: Re: MULTIPLE OUTER JOIN SYNTAX :-( can't quess it In-reply-to: <3AED6EB6.6D808185@flex.ro> References: <3AED6EB6.6D808185@flex.ro> Comments: In-reply-to Constantin Teodorescu message dated "Mon, 30 Apr 2001 16:55:02 +0300" Date: Mon, 30 Apr 2001 15:05:37 -0400 Message-ID: <17688.988657537@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200104/140 X-Sequence-Number: 1524 Constantin Teodorescu writes: > I want a select query with them with 2 outer joins like that > t0.id = t1.author > t0.id = t2.id > Tried : > select t0.name, t1.title, t2.nickname from authors t0 left outer JOIN > books t1 ON (t0."id"=t1."author") , authors t0 left outer join nicknames > t2 on (t0."id"=t2."id") > but it says "author table declared more than once". select t01.name, t01.title, t2.nickname from (authors t0 left outer join books t1 on (t0."id"=t1."author")) t01 left outer join nicknames t2 on (t01."id"=t2."id") ; There are variants but that's the basic idea... regards, tom lane