Select * into #tmp from A
update A set a.value = b.value,a.type = b.type from A ,b where a.id = b.a_id
update B set b.value = a.value,b.type = a.type from #tmp a , b where a.id = b.a_id
Select * into #tmp from A
update A set a.value = b.value,a.type = b.type from A join b on a.id = b.a_id
update B set b.value = a.value,b.type = a.type from #tmp a join b on a.id = b.a_id