Join postgres table on two columns?

This is possible:

The ON clause is the most general kind of join condition: it takes a Boolean value expression of the same kind as is used in a WHERE clause. A pair of rows from T1 and T2 match if the ON expression evaluates to true for them.

http://www.postgresql.org/docs/9.1/static/queries-table-expressions.html#QUERIES-FROM

Your SQL looks OK.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)