Search Postgresql Archives

Re: LEFT and RIGHT JOIN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Misa Simic <misa.simic@xxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux