SQL multiple join statement

For multi-table joins, you have to nest the extra joins in brackets:

SELECT ...
FROM ((origintable
JOIN jointable1 ON ...)
JOIN jointable2 ON ...)
JOIN jointable3 ON ...

basically, for every extra table you join past the first, you need a bracket before the original ‘FROM’ table, and a closing bracket on the matching JOIN ‘on’ clause.

Leave a Comment

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