OCP-1Z0-051-V9.02-17题
来源:互联网 发布:linux shell 权限不够 编辑:程序博客网 时间:2024/04/29 08:06
17. View the E xhibit and examine the data in the EMPLOYEES table.
You want to generate a report showing the total compensation paid to each employee to date.
You issue the following query:
SQL>SELECT ename ' joined on ' hiredate
', the total compensation paid is '
TO_CHAR(ROUND(ROUND(SYSDATE-hiredate)/365) * sal + comm)
"COMPENSATION UNTIL DATE"
FROM employees;
sys@TESTDB> select * from scott.emp; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7369 SMITH CLERK 7902 17-DEC-80 800 20 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7566 JONES MANAGER 7839 02-APR-81 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
What is the outcome?
A. It generates an error because the alias is not valid.
B. It executes successfully and gives the correct output.
C. It executes successfully but does not give the correct output.
D. It generates an error because the usage of the ROUND function in the expression is not valid.
E. It generates an error because the concatenation operator can be used to combine only two items.
sys@TESTDB> select TO_CHAR(ROUND(ROUND(SYSDATE-hiredate)/365) * sal + comm) "COMPENSATION UNTIL DATE" 2 from scott.emp;COMPENSATION UNTIL DATE----------------------------------------5310041750414004800014 rows selected.
因为comm有null值,故任何数值与nll相加为null,故出错。
此题答案选C
- OCP-1Z0-051-V9.02-17题
- OCP-1Z0-051-V9.02-17题
- OCP-1Z0-051-V9.02-1题
- OCP-1Z0-051-V9.02-1题
- OCP-1Z0-051-V9.02-1题
- OCP-1Z0-051-V9.02-11题
- OCP-1Z0-051-V9.02-12题
- OCP-1Z0-051-V9.02-14题
- OCP-1Z0-051-V9.02-15题
- OCP-1Z0-051-V9.02-18题
- OCP-1Z0-051-V9.02-21题
- OCP-1Z0-051-V9.02-118题
- OCP-1Z0-051-V9.02-120题
- OCP-1Z0-051-V9.02-32题
- OCP-1Z0-051-V9.02-33题
- OCP-1Z0-051-V9.02-93题
- OCP-1Z0-051-V9.02-94题
- OCP-1Z0-051-V9.02-95题
- .net生态环境的弱化
- 悔学
- HTML DOM元素的事件的Bubbling 和 Capturing
- [oracle]ORA-00942: 表或视图不存在错误的一个可能原因
- 静态成员函数,静态数据成员
- OCP-1Z0-051-V9.02-17题
- arx函数
- Android学习笔记16:Button控件图文混排效果的实现
- CCNode
- 装修医疗网站推广方案
- Android.mk文件语法
- Android常用动画Frame-By-Frame Animations的使用
- per cpu
- typedef 与 typedef struct