oracle mysql sql 根据一张表更新另一张表

update CDINFO.Dept_Dict tab1 set PART_FLAG = (select PART_FLAG from DICT.DEPARTMENT_DICT@zyhis4 tab2 where tab1.dept_code = tab2.dept_code) where exists (select 1 from DICT.DEPARTMENT_DICT@zyhis4 tab2 where tab1.dept_code = tab2.dept_code)
-------------------------------------------------------------------------
## 极客时间全网最便宜最优惠购买方式,优惠券返现 百度网盘 微信关注公众号“选门好课”
扫描下方二维码关注我的公众号"选门好课",与我一起交流知识
原文地址:https://www.cnblogs.com/singworld/p/12166511.html