select col1,col2,sum(col3) 
into table5
from
(
select * from table1
union all 
select * from table2
union all
select col1,col2,-col3
union all
select col1,col2,-col3
) T
group by col1,col2注:列名简写了。