zoukankan      html  css  js  c++  java
  • 【ocp12c】最新Oracle OCP071考试题库(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 函数)

  • 相关阅读:
    filter
    列表生成式
    迭代
    切片:练习
    Python FAQ
    活在深圳
    “30岁年薪20万算不算很失败?”人民日报这样回答
    ASP.NET Core 运行原理解剖[1]:Hosting
    Kotlin 初窥门径[2]:流程控制
    Kotlin 初窥门径[1]:基础概念
  • 原文地址:https://www.cnblogs.com/cnblogs5359/p/10438295.html
Copyright © 2011-2022 走看看