merge into 相关操作
来源:互联网 发布:普通人如何利用大数据 编辑:程序博客网 时间:2024/05/23 01:19
今天看ocp题,有一个新的发现:
View the Exhibit and examine the data in ORDERS_MASTER and MONTHLY_ORDERS
tables. Evaluate the following MERGE statement:
MERGE INTO orders_master o
USING monthly_orders m
ON (o.order_id = m.order_id)
WHEN MATCHED THEN
UPDATE SET o.order_total = m.order_total
DELETE WHERE (m.order_total IS NULL)
WHEN NOT MATCHED THEN
INSERT VALUES (m.order_id, m.order_total);
What would be the outcome of the above statement?
A. The ORDERS_MASTER table would contain the ORDER_IDs 1 and 2.
B. The ORDERS_MASTER table would contain the ORDER_IDs 1, 2 and 3.
C. The ORDERS_MASTER table would contain the ORDER_IDs 1, 2 and 4.
D. The ORDERS_MASTER table would contain the ORDER_IDs 1, 2, 3 and 4.
Answer: C
当匹配上 的时候竟然可以执行两种操作;经过实验发现,这两种操作针对的是相同的行(两表匹配上的行),其余行不考虑;
- merge into 相关操作
- oracle的merge into操作详解
- merge into
- merge into
- merge into
- merge into
- merge into
- Merge into
- merge into
- merge into
- Merge into
- merge into
- Merge into
- Merge Into
- oracle MERGE INTO...USING两表关联操作(效率高)
- Merge into使用详解( 同时执行inserts和updates操作 )
- Oracle merge into 批量操作可以支持重复记录
- Oracle select --merge into:
- Linux进程阻塞的相关知识
- 反射Reflect
- Xcode4.2破解
- SDJZ 找规律填数字
- 驳岸
- merge into 相关操作
- 反射的基石Class类
- hdu 2586 How far away ?(LCA 求两点距离)
- 枚举 Enumeration
- POJ 2455 网络流 基础题 二分+网络流 dicnic 以及 sap算法
- 基于matlab边缘提取的几种方法的比较
- windowless
- 银行汇票与银行本票区别解析
- java——注解