select * into #f
from(
select aa ,bb from table1 
union all
select aa,bb from  table2
) as TableA