数据库系列—— merge into用法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了数据库系列—— merge into用法相关的知识,希望对你有一定的参考价值。

参考技术A merge into 目标表 a

using 源表 b

on(a.条件字段1=b.条件字段1 and a.条件字段2=b.条件字段2 ……) 

when matched then update set a.更新字段=b.字段

when  not matched then insert into a(字段1,字段2……)values(值1,值2……

可以不写when  not matched。

以上是关于数据库系列—— merge into用法的主要内容,如果未能解决你的问题,请参考以下文章

Merge Into 用法

oracle merge into用法

Oracle中merge Into的用法

oraclemergeinto用法及例子

Oracle中Merge into用法总结

ORCAL Merge into用法总结