Oracle 多表Update

Oracle 多表Update

Oracle的Upate语句比Mysql要复杂一些,在Mysql下简单的多表连接更新,在Oracle下的写法放人比较疑惑。

update HIDEHAI_BALANCE_COMPARE HBC
set HBC.ADD_M=(select HBA.ADD_M
from HIDEHAI_BALANCE_ADD HBA
where HBA.MEMBER_NO=HBC.MEMBER_NO)
where exists (select 1
from HIDEHAI_BALANCE_ADD HBA
where HBA.MEMBER_NO=HBC.MEMBER_NO
);

参考链接:
ORACLE 多表关联 UPDATE 语句
http://yinzhihua2008.blog.163.com/blog/static/794306720091184434668/

留下回复