【2019年8月版本】Oracle OCP认证 071考试原题-58
最新学讯:近期OCP认证正在报名中,因考试人员较多请尽快报名获取最近考试时间,报名费用请联系在线老师,甲骨文官方认证,报名从速!
我要咨询【2019年8月版本】OCP 071认证考试最新版本的考试原题-58-CUUG整理
OCP的071考试,在8月份左右全部换了新题,近期考试的题也全部不包括之前的题库了,这次Oracle更新071考试题库,虽然全都是新题,但跟之前的相比也有关联,比如把之前的考题稍微变换一下数字、更新一下日期、或者再加一个错误选项等等。
对于2019年8月份的更新,我们CUUG已经进行了收集整理,并给出初步的答案和讲解,仅供参考,希望对考OCP 071认证的同学有帮助。
choose two
Examine this description of the PRODUCTS table:
Name Null? Type
---------------------------------------------------------------------------
PROD_ID NOT NULL NUMBER(2)
QTY NUMBER(5,2)
COST NUMBER(8,2)
You successfully execute this command:
CREATE TABLE new_prices (prod_id NUMBER(2),price NUMBER(8,2));
which two statements execute without errors?
A) MERGE INTO new_prices n
USING (SELECT * FROM products) p
WHEN MATCHED THEN
UPDATE SET n.price = p. cost*.01
WHEN NOT MATCHED THEN
INSERT (n.prod_id, n.price) VALUES (p.prod_id, cost* .01)
WHERE (p.cost < 200) ;
B) MERGE INTO new_prices n
USING (SELECT * FROM products WHERE cost> 150) p
ON (n.prod_id=p.prod_id)
WHEN MATCHED THEN
DELETE WHERE (p.cost < 200)
WHEN NOT MATCHED THEN
INSERT (n.prod_id, n.price) VALUES (p.prod_id, p.cost*.01);
C) MERGE INTO new_prices n
USING (SELECT * FROM products WHERE cost>150) p
ON (n.prod_id= p.prod_id)
WHEN MATCHED THEN
UPDATE SET n.price= p.cost*.01
DELETE WHERE (p.cost < 200);
D) MERGE INTO new_prices n
USING products p
ON (p.prod_id = n.prod_id)
WHEN NOT MATCHED THEN
INSERT (n,prod_id, n.price) VALUES (p.prod_id, p.cost*.01)
WHERE (p.cost < 200);
Answer:CD
(解析:merge into 的语法一般是 mathed 就 update,否则就 insert,本题故意把语法复杂化,加了 delete 操作。但是最重要的一定要有 using…..on 子句。)