博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【ocp-12c】最新Oracle OCP-071考试题库(39题)
阅读量:7190 次
发布时间:2019-06-29

本文共 882 字,大约阅读时间需要 2 分钟。

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, salary12 + NVL(salary, 0)commission_pct "Total"

FROM EMPLOYEES;

B) SELECT first_name, salary, salary12+(salaryNVL2(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, salary12+salarycommission_pct "Total"

FROM EMPLOYEES;

Answer:A

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

转载于:https://blog.51cto.com/13854012/2355133

你可能感兴趣的文章
windows 2008新建域时提示密码不符合要求的解决方法
查看>>
更改Oracle数据库密码导致vcenter服务无法启动
查看>>
使用screen管理远程会话
查看>>
mysql status 详细解释
查看>>
Linux SSH 密钥认证自动登录
查看>>
我的友情链接
查看>>
我的友情链接
查看>>
Y450的Linux之路【01-1】——安装系统、显卡(安装第一天,持续更新)
查看>>
汉字转换为拼音的JavaScript库
查看>>
MySQL学习笔记(一)
查看>>
Pxe+Kickstart无人职守安装
查看>>
linux命令及使用技巧 week2
查看>>
当前位置精确定位
查看>>
LVS+Keepalived+IIS实负载均衡
查看>>
盒子模型学习笔记
查看>>
网站性能优化
查看>>
ionic2-Alert弹出框
查看>>
(FortiGate)飞塔防火墙IPS(***防御)解决方案
查看>>
生产环境Cobbler安装服务器部署实战
查看>>
python 多级字典值合并
查看>>