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)
posted @ 2021-08-19 16:44  醉酒三分醒  阅读(431)  评论(0编辑  收藏  举报