From: | Steve Tucknott <steve(at)retsol(dot)co(dot)uk> |
---|---|
To: | PostGreSQL <pgsql-novice(at)postgresql(dot)org> |
Subject: | Left Outer Join Syntax |
Date: | 2004-08-14 07:33:37 |
Message-ID: | 1092468819.1255.15.camel@retsol1 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
What is the correct syntax for the following.
I have table A joined to table B and C. I also have table A left outer
joined to tables D and E
and in turn D is joined to F
SELECT A.*,B.*,C.*,D.*,E.*,F.*
FROM A
LEFT OUTER JOIN D
ON A.colD = D.colA
LEFT OUTER JOIN E
ON A.colE = E.colA,
B,
C
WHERE A.col1 = ?
AND A.colB = B.colA
AND A.colC = C.colA
(I know I can move the B and C table joins and make them explicit joins
off A)
How do I include the join of table F to table D where F.colD = D.colF in
the case where 1) F is a LEFT OUTER and 2) where F is plain (INNER?)
join
Thanks in advance
Regards,
Steve Tucknott
ReTSol Ltd
DDI: 01903 828769
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas | 2004-08-14 12:06:11 | Re: PGSQL 8-beta For WinXP Home Edition Instructions |
Previous Message | Stephan Szabo | 2004-08-13 17:43:39 | Re: PGSQL Crossroads |