码迷,mamicode.com
首页 > 其他好文 > 详细

【12c OCP】最新CUUG OCP-071考试题库(50题)

时间:2019-03-01 14:15:15      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:null   statement   运行   出现   sel   考试   nvl   tin   cut   

50、(11-15)choose two

Examine the structure of the MARKS table:

Which two statements would execute successfully?

A) SELECT SUM(subjectl+subject2+subject3)

FROM marks

WHERE student_name IS NULL;

B) SELECT SUM(DISTINCT NVL(subject1,0)), MAX(subjectl)

FROM marks

WHERE subjectl > subject2;

C) SELECT student_name,subjectl

FROM marks

WHERE subjectl > AVG(subjectl);

D) SELECT student_name, SUM (subjectl)

FROM marks

WHERE student_name LIKE ‘R%‘;

Answer:AB

(解析:C 答案 where 子句中用到了 avg 函数,必须用 having;D 答案 student_name 没有在 group by 子句中出现。

B 答案可以写成如下方式运行:

SELECT SUM(DISTINCT NVL(comm,0)), MAX(sal)

FROM emp

WHERE sal > comm;

)

【12c OCP】最新CUUG OCP-071考试题库(50题)

标签:null   statement   运行   出现   sel   考试   nvl   tin   cut   

原文地址:https://blog.51cto.com/13854012/2356633

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!