Is it possible to select multiple tables and make inner join on one of those tables? e.g.
SELECT *
FROM table1 AS t1, table2 AS t2, table3 AS t3
INNER JOIN table4 AS t4 ON t1.row3 = t4.row3
INNER JOIN table5 AS t5 ON t1.row4 = t5.row4
WHERE ...
This paricular case is causing me a problem. it gives me an error – Unknown column “t1.row3” in ‘on clause’. I don’t know if it’s possible to select multiple tables but make inner join on one of those tables.
The
JOINoperand has higher precedence than comma,operand, so the join is effectively treated asPut parentheses around t1, t2, t3.
You can also write your query as:
because comma is equivalent to INNER JOIN without a join condition.