Search Postgresql Archives

Re: What's wrong with this query?

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

 



Mike Christensen <mike@xxxxxxxxxxxxx> writes:
> So are you saying that a JOIN can only refer to itself and the last
> table on the FROM list?

Um, I think you've got the wrong mental model of the syntax.  JOIN
is a binary operation between two tables:

	tab1 JOIN tab2 ON some-condition-involving-tab1-and-tab2-only

You can nest these critters (ie, tab1 or tab2 could itself be a
JOIN construct), and you can write them as elements of a comma-separated
FROM list.  But the ON condition can never refer to anything outside
its JOIN construct.

			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