大數(shù)據(jù)就業(yè)實(shí)戰(zhàn)培訓(xùn) Oracle就業(yè)實(shí)戰(zhàn)培訓(xùn)
071考試題庫之前是比較穩(wěn)定的,但隨著Oracle的調(diào)整,071考試不斷的增加新的考題,增加了考試的難度,所以我們專門收集整理了這些考試,并對這些考題進(jìn)行解析,希望可以對考生有幫助。
每周五晚8點(diǎn),我們有免費(fèi)的OCP解析公開課,地址:https://ke.qq.com/course/326223 OCP題庫交流群:1015267481,驗(yàn)證ocp
-------------------------------------------------------
071考試-第21題、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,所