insert tableC(filedA,filedB,filedC)
select case when a.fieldA is not null thena.fieldA else b.fieldA end as fieldA,fieldB,fieldC from tableA a full outer join tableB b on a.fieldA=b.fieldA
select case when a.fieldA is not null thena.fieldA else b.fieldA end as fieldA,fieldB,fieldC from tableA a full outer join tableB b on a.fieldA=b.fieldA
insert tableC(filedA,filedB) select * from tableA
update b set b.fieldC = a.filedC from tableB a,tableC b where a.filedA = b.filedA
insert tableC(filedA,filedC) select a.* from tableB a left outer join tableC b on a.filedA = b.filedA where b.filedA is null