New answers tagged

1

Because you have four tables establishing the hierarchy you can simply join all of the elements directly: SELECT level1.key1 ,level1.key2 ,level2.key3 ,level3.key4 FROM table1 level1 LEFT JOIN table2 level2 ON level2.key2 = level1.key2 LEFT JOIN table3 level3 ON level3.key3 = level2.key3


Top 50 recent answers are included