ocp-12c最新Oracle OCP-071考试题库(39题)

Posted cnblogs_5359

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ocp-12c最新Oracle OCP-071考试题库(39题)相关的知识,希望对你有一定的参考价值。

39.choose the best answer

View the Exhibit and examine the description of the EMPLOYEES table.

 

You want to calculate the total remuneration for each employee. Total remuneration is the sum of the annual salary and the percentage commission earned for a year.

Only a few employees earn commission.

Which SQL statement would you execute to get the desired output?

A) SELECT first_name, salary, salary*12 + NVL(salary, 0)*commission_pct "Total"

FROM EMPLOYEES;

B) SELECT first_name, salary, salary*12+(salary*NVL2(commission_pct,

salary,salary+commission_pct)) "Total"

FROM EMPLOYEES;

C) SELECT first_name, salary, (salary + NVL(commission_pct,0)*salary)*12 "Total"

FROM EMPLOYEES;

D) SELECT first_name, salary, salary*12+salary*commission_pct "Total"

FROM EMPLOYEES;

Answer:A

(解析:题眼是“Only a few employees earn commission”,说明有人的佣金是 null,所以要用 nvl 函数)

以上是关于ocp-12c最新Oracle OCP-071考试题库(39题)的主要内容,如果未能解决你的问题,请参考以下文章

ocp-12c最新Oracle OCP-071考试题库(43题)

ocp-12c最新Oracle OCP-071考试题库(40题)

ocp-12c最新Oracle OCP-071考试题库(42题)

ocp-12c最新Oracle OCP-071考试题库(46题)

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

ocp-12c最新Oracle OCP-071考试题库(38题)