sqlserver:
update A a set a.i = b.k from B b where a.key = b.key
oracle :
update A a set a.i = (select b.k-b.unk from B b where a.key = b,key) where exists(select 1 from B b a.key = b.key)