select a.column1,a.column2,b.column3 from table1 a join table2 b on a.sameColumn1=b.sameColumn1 and a.sameColumn2=b.sameColumn2