oracle merge into 语法

Posted

tags:

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

MERGE INTO upperLowerLimitData t1
USING (select name,enname,starttime,value ...   from dual) t2
ON (t1.name = t2.name and t1.enname = t2.enname)
WHEN MATCHED THEN
UPDATE SET t1.starttime = t2.starttime, t1.value = t2.value
WHEN NOT MATCHED THEN
INSERT (t1.name,t1.cid,t1.id,t1.aid,t1.starttime,t1.stoptime,t1.inttype,t1.interval,t1.enname,t1.value)
VALUES (t2.name,t2.cid,t2.id,t2.aid,t2.starttime,t2.stoptime,t2.inttype,t2.interval,t2.enname,t2.value)

以上是关于oracle merge into 语法的主要内容,如果未能解决你的问题,请参考以下文章

Oracle 使用MERGE INTO 语句更新数据

Oracle中Merge into用法总结

Oracle基础之Merge into

Oracle:Merge Into 实例

Orcal语法Merge into用法

oracle merge into用法