sql 多表联合查询更新

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)
原文地址:https://www.cnblogs.com/hugeboke/p/15162575.html