oracle中合并insert、update语句
来源:互联网 发布:linux ping timeout 编辑:程序博客网 时间:2024/06/05 07:39
UpSert功能:
MERGE <hint> INTO <table_name>
USING <table_view_or_query>
ON (<condition>)
WHEN MATCHED THEN <update_clause>
WHEN NOT MATCHED THEN <insert_clause>;
eg:
create table ww_test(
id number,
name varchar2(30),
age number
);
create table ww_test2(
id2 number,
name varchar2(30),
age number
);
--将ww_test2中的记录合并到ww_test中(相同id的更新name,没有的插入)
merge into ww_test a
using ww_test2 b
on (a.id = b.id)
when matched then
update set a.name = b.name
when not matched then
insert values(b.id,b.name,b.age);
- oracle中合并insert、update语句
- ORACLE MERGE 介绍(合并UPDATE和INSERT语句)
- oracle中merge into..using..on..when..when..用法 使用一条语句实现update/insert 语句
- Oracle中5个核心Sql语句的基本构造:Select、Insert、Update、Delete和Merge
- mysql insert update语句
- MySQL insert update语句
- Oracle DML语句(insert,update,delete) 回滚开销估算
- Oracle DML语句(insert,update,delete) 回滚开销估算
- Merge Into 语句代替Insert/Update在Oracle中的应用
- Oracle-自动生成insert、update、select、javabean语句
- oracle执行update和insert语句卡住不动
- QtCreator Qt中执行SQL语句,select,update,delete,insert
- Magento中直接使用SQL语句 select insert update
- Mysql中组合的insert和update语句
- Insert 语句中同时带查询(Oracle)
- Oracle中Insert语句的总结
- MYSQL INSERT UPDATE DELETE 语句
- DML语句(delete,insert,update)
- Linux的应用--Video Streaming探讨 五
- PS 研究:圆形笔刷与渐变曲率
- Linux的应用--Video Streaming探讨 六
- C#编程命名规范
- 基于嵌入式linux和s32410平台的视频采集
- oracle中合并insert、update语句
- 重读页面的回收处理笔记2
- H.264之指数哥伦布编解码分析
- 查找历史纪录的代码
- [转]web.xml文件详解
- 表格边框/单元格之间分隔线的隐藏实现方法
- 数据分析(摘自百度)
- vs2005 写的web servcies 在.net 2003下调用时报xml 604异常原因是因为实体类,声明类型两个环境不一样
- 面向对象设计的设计原则