Left Outer Join Syntax

Поиск
Список
Период
Сортировка
От Steve Tucknott
Тема Left Outer Join Syntax
Дата
Msg-id 1092468819.1255.15.camel@retsol1
обсуждение исходный текст
Ответы Re: Left Outer Join Syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Sean Davis
Дата:
Сообщение: Re: Using pgaccess and xpg
Следующее
От: Andreas
Дата:
Сообщение: Re: PGSQL 8-beta For WinXP Home Edition Instructions