I have 4 tables, which are linked together with a foreign key from another, eg Table 2 has fk_table1, Table 3 has fk_table2, Table 4 has fk_table3.
The first 3 tables in this chain all have corresponding data for each entry. However, Table 4 contain optional data, therefore, there may not be a corresponding entry for a field in say Table 3.
But I want those data from Table 4 too. This is currently what I have, but doesn't work.
SELECT *
FROM T1, T2, T3 LEFT JOIN T4
WHERE T1.t1 = T2.t1
AND T2.t2 = T3.t2
AND T3.t3 = T4.t3