OCP-1Z0-新051-61题版本-13
来源:互联网 发布:数据采集兼职 编辑:程序博客网 时间:2024/06/06 01:04
QUESTION NO: 13
Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables:
Which MERGE statement is valid?
A.MERGE INTO new_employees c USING employees e ON (c.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE SET
name = e.first_name ||','|| e.last_name WHEN NOT MATCHED THEN INSERT value S(e.employee_id, e.first_name ||', '||e.last_name);
B.MERGE new_employees c USING employees e ON (c.employee_id = e.employee_id) WHEN EXISTS THEN UPDATE SET
name = e.first_name ||','|| e.last_name WHEN NOT MATCHED THEN INSERT valueS(e.employee_id, e.first_name ||', '||e.last_name);
C. MERGE INTO new_employees c USING employees e ON (c.employee_id = e.employee_id) WHEN EXISTS THEN UPDATE SET
. name = e.first_name ||','|| e.last_name WHEN NOT MATCHED THEN INSERT value S(e.employee_id, e.first_name ||',
'||e.last_name);
D.MERGE new_employees c FROM employees e ON (c.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE SET
. name = e.first_name ||','|| e.last_name WHEN NOT MATCHED THEN INSERT INTO new_employees valueS(e.employee_id, e.first_name ||', '||e.last_name);
Answer: A
答案解析:
参考:此题考MERGE的语法
Examples
Merging into a Table: Example The following example uses the bonuses
table in the sample schema oe
with a default bonus of 100. It then inserts into thebonuses
table all employees who made sales, based on the sales_rep_id
column of the oe.orders
table. Finally, the human resources manager decides that employees with a salary of $8000 or less should receive a bonus. Those who have not made sales get a bonus of 1% of their salary. Those who already made sales get an increase in their bonus equal to 1% of their salary. The MERGE
statement implements these changes in one step:
Explanation: Explanation: this is the correct MERGE statement syntax
Incorrect answer:
Bit should MERGE INTO table_name
Cit should be WHEN MATCHED THEN
Dit should MERGE INTO table_name
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 8-29
- OCP-1Z0-新051-61题版本-13
- OCP-1Z0-新051-61题版本-61
- OCP-1Z0-新051-61题版本-1
- OCP-1Z0-新051-61题版本-2
- OCP-1Z0-新051-61题版本-3
- OCP-1Z0-新051-61题版本-4
- OCP-1Z0-新051-61题版本-5
- OCP-1Z0-新051-61题版本-6
- OCP-1Z0-新051-61题版本-7
- OCP-1Z0-新051-61题版本-8
- OCP-1Z0-新051-61题版本-9
- OCP-1Z0-新051-61题版本-10
- OCP-1Z0-新051-61题版本-11
- OCP-1Z0-新051-61题版本-12
- OCP-1Z0-新051-61题版本-14
- OCP-1Z0-新051-61题版本-15
- OCP-1Z0-新051-61题版本-16
- OCP-1Z0-新051-61题版本-17
- JVM 深入笔记(2)各内存区溢出场景模拟
- MyEclipse中SVN的使用方法
- OCP-1Z0-新051-61题版本-11
- API创建员工地址
- OCP-1Z0-新051-61题版本-12
- OCP-1Z0-新051-61题版本-13
- 成功的钥匙?毅力——2013总结(经历)
- OCP-1Z0-新051-61题版本-14
- API创建员工
- 什么是逃逸分析(Escape Analysis)?
- OCP-1Z0-新051-61题版本-15
- OCP-1Z0-新051-61题版本-16
- 排錯體會
- Java--学习九九乘法表