码迷,mamicode.com
首页 > 其他好文 > 详细

051-17

时间:2017-12-20 16:59:30      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:图片   only   rate   tco   post   exp   char   color   function   

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;
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.

ROUND(ROUND(SYSDATE-hiredate)/365) 如果SYSDATE-hiredate小于183则round四舍五入就等于0

051-17

标签:图片   only   rate   tco   post   exp   char   color   function   

原文地址:http://www.cnblogs.com/Babylon/p/8074092.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!