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)
posted @ 2020-01-08 14:37  剑小新  阅读(751)  评论(0编辑  收藏  举报