Re: LEFT and RIGHT JOIN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LEFT and RIGHT JOIN
Дата
Msg-id 24369.1341009412@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: LEFT and RIGHT JOIN  (Misa Simic <misa.simic@gmail.com>)
Список pgsql-general
Misa Simic <misa.simic@gmail.com> writes:
> Yes you are right... I wanted: t1 left join (t2 inner join t3)
> Is there a way to "say" that?

Sure, just add the parentheses.

    t1 left join (t2 inner join t3 on t2-t3-condition) on t1-t2-condition

> I mean to me, it is logical and without
> brackets... i.e. t1 left join t2 inner join t3 left join t4, I would read
> as: t1 left join (t2 inner join t3) left join t4 .... (Like INNER has
> advantage on OUTER...)...

Well, that might or might not be more intuitive, but the SQL standard
says these bind equally, left to right, unless you use parens.

            regards, tom lane

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

Предыдущее
От: Misa Simic
Дата:
Сообщение: Re: LEFT and RIGHT JOIN
Следующее
От: Misa Simic
Дата:
Сообщение: Re: LEFT and RIGHT JOIN