create table temp_table as select * from haupttabelle as h left outer join filialtabelle01 as f1 on h.id = f1.h_id left outer join filialtabelle02 as f2 on h.id = f2.h_id -- usw. ;