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题)的更多相关文章

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

    72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...

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

    71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...

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

    70.(31-2)choose the best answer: View the Exhibit and examine the structure of the Book table. The B ...

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

    69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...

  5. 【OCP题库】最新CUUG OCP 12c 071考试题库(68题)

    68.(29-13)choose two: Which two statements are true? (Choose two.) A) DICTIONARY is a view that cont ...

  6. 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)

    67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...

  7. 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)

    66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...

  8. 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)

    65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...

  9. OCP 12c最新考试题库及答案(071-2)

    2019-02-12 16:23:54   2.(4-7) choose the best answer:You need to display the first names of all cust ...

  10. 【OCP-12c】2019年CUUG OCP 071考试题库(80题)

    80.View the exhibit and examine the structure in ORDERS and ORDER_ITEMS tables. You need to create a ...

随机推荐

  1. Node.js究竟是什么?

    来源:https://www.ibm.com/developerworks/cn/opensource/os-nodejs/index.html?ca=drs#ibm-pcon   Node 旨在解决 ...

  2. swarm调度

    Swarm filters Configure the available filters 过滤器分为两类,即节点过滤器和容器配置过滤器. 节点过滤器对Docker主机的特性或Docker守护程序的配 ...

  3. JSP中系统Date的几点不符合中国时间观的地方

    正常调用系统时间的显示格式是Date date = new Date 显示出来的当前时间为Sun Nov 22 18:39:51 CST 2015 星期天的英文单词是Sun, 这个大家都是熟悉的, 这 ...

  4. 二叉搜索树的后序遍历序列 (java)

    import java.util.*; public class Solution { public boolean VerifySquenceOfBST(int [] sequence) { if( ...

  5. Java_String_Arrays_Character_BigDecimal_Calendar_Math_System

    1.String package cn.itcast_01;   /* * Scanner:用于接收键盘录入数据. * * 前面的时候: * A:导包 * B:创建对象 * C:调用方法 * * Sy ...

  6. python 3 print function

    if episode % 50 == 0: print('Episode {} Total Reward: {} counter: {}'.format(episode,G,counter))

  7. [Java] Java API文档下载方法

    Java API文档下载方法:http://jingyan.baidu.com/article/a3aad71ac9e48fb1fb009692.html Oracle : http://www.or ...

  8. 从cookie中取值$.cookie()

    从cookie中取值: var userid = $.cookie("remoteuserid");例子: function delUser() {     var table = ...

  9. [转]Android下怎么使用LDD查看依赖库

    Android下没有ldd可以使用,在进行ndk开发的时候,检查库的依赖项特别麻烦.有两个解决方案: 1.将linux的的ldd移植过去.因为android也是基于linux的,所以将ldd移植过去是 ...

  10. UVa 1374 Power Calculus (IDA*或都打表)

    题意:给定一个数n,让你求从1至少要做多少次乘除才可以从 x 得到 xn. 析:首先这个是幂级的,次数不会很多,所以可以考虑IDA*算法,这个算法并不难,难在找乐观函数h(x), 这个题乐观函数可以是 ...