OCP 1Z0 051 QUESTION NO: 47

来源:互联网 发布:12123但确实无数据返回 编辑:程序博客网 时间:2024/06/14 04:12
QUESTION NO: 47 
 
Which three are true? (Choose three.)
 
A. A MERGE statement is used to merge the data of one table with data from another. 
B. A MERGE statement replaces the data of one table with that of another. 
C. A MERGE statement can be used to insert new rows into a table. 
D. A MERGE statement can be used to update existing rows in a table. 

merge  报错
英 [mɜːdʒ]  美 [mɝdʒ]  口语练习 跟读

  • vt. 合并;使合并;吞没
  • vi. 合并;融合
  • n. (Merge)人名;(意)梅尔杰


见文档
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9016.htm#SQLRF55141
中示例语句
MERGE INTO bonuses D   USING (SELECT employee_id, salary, department_id FROM employees   WHERE department_id = 80) S   ON (D.employee_id = S.employee_id)   WHEN MATCHED THEN UPDATE SET D.bonus = D.bonus + S.salary*.01     DELETE WHERE (S.salary > 8000)   WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)     VALUES (S.employee_id, S.salary*.01)     WHERE (S.salary <= 8000);
merge可以同时执行update、insert、delete动作
把另一个表中的数据更新、插入至目标表。同时可以删除目标表指定范围的的数据
 
Answer: A,C,D
0 0
原创粉丝点击