码迷,mamicode.com
首页 > 数据库 > 详细

【ocp-12c】最新Oracle OCP-071考试题库(45题)

时间:2019-02-28 10:37:25      阅读:228      评论:0      收藏:0      [点我收藏+]

标签:function   空值   sql   express   ||   exp   each   EDA   tco   

45、(9-16)choose the best answer:

View the Exhibit and examine the data in the EMPLOYEES table.

You want to generate a report showing the total compensation paid to each employee to date(迄今为止支付给每位员工的总补偿).

You issue the following query:

SQL>SELECT ename ||‘ joined on ‘|| hiredate ||

‘, the total compensation paid is ‘||

TO_CHAR(ROUND(ROUND(SYSDATE-hiredate)/365) * sal + comm)

"COMPENSATION UNTIL DATE"

FROM employees;

What is the outcome?

A) It executes successfully and gives the correct output.

B) It generates an error because the usage of the ROUND function in the expression is not valid.

C) It generates an error because the concatenation operator can be used to combine only two items.

D) It generates an error because the alias is not valid.

E) It executes successfully but does not give the correct output.

Answer:E

(解析:因为 comm 列上有空值,所以会导致某些计算的结果为空)

【ocp-12c】最新Oracle OCP-071考试题库(45题)

标签:function   空值   sql   express   ||   exp   each   EDA   tco   

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

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