加入收藏 | 设为首页 | 会员中心 | 我要投稿 4S站长网 (https://www.4s3.cn/)- 科技、混合云存储、数据迁移、云上网络、数据计算!
当前位置: 首页 > 数据库 > Oracle > 正文

oracle 用一个表的数据去更新另外一个表的数据

发布时间:2021-01-11 19:36:47 所属栏目:Oracle 来源:互联网
导读:去掉 有重复数据的 情况 merge into acl_user p using (select * from testimportuser X where X.ROWID=(select max(Y.ROWID) from testimportuser Y where X.yhdm=Y.yhdm ) ) np on (p.yhdm=np.yhdm) when matche

去掉 有重复数据的 情况

merge into acl_user p using (select * from testimportuser X where X.ROWID=(select max(Y.ROWID) from testimportuser Y where X.yhdm=Y.yhdm ) ) np on (p.yhdm=np.yhdm) when matched then update set p.sfzmhm=np.sfzhm when not matched then insert(p.yhdm,p.xm,p.sfzmhm,p.cjsj)values(np.yhdm,np.xm,np.sfzhm,sysdate)

(编辑:4S站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读