oracle 10g里,Merge语句的重大改进 zt

本文介绍了 Oracle 10g 数据库中合并 (MERGE) 语句的重要增强特性,包括可选的 MATCHED 和 NOT MATCHED 子句、条件插入与更新操作及 DELETE 子句等,这些改进使 MERGE 语句更为灵活。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

发表人:www.wwf.co | 发表时间: 2007年七月23日, 10:10

1, 能嵌入delete语句

2, update, insert语句能嵌入where clause

3, update语句与insert语句,不必同时出现,是可选的(optional)


http://www.oracle-base.com/articles/10g/MergeEnhancements10g.php

MERGE Statement Enhancements in Oracle Database 10g

Oracle 10g includes a number of amendments to the MERGE statement making it more flexible.

Test Table

The following examples use the table defined below.


  

Optional Clauses

The MATCHED and NOT MATCHED clauses are now optional making all of the following examples valid.


  

Conditional Operations

Conditional inserts and updates are now possible by using a WHERE clause on these statements.


  

DELETE Clause

An optional DELETE WHERE clause can be used to clean up after a merge operation. Only those rows which match both the ON clause and the DELETE WHERE clause are deleted.


  
[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/82387/viewspace-1016320/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/82387/viewspace-1016320/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值