select t1.a,t1.b,t1.c,SubSel1.d,SubSel1.efrom table1 as t1join (select d,e,f from table2) as SubSel1 on t1.a = SubSel1.d