OCP-1Z0-051-V9.02-78题

来源:互联网 发布:网络21系统 编辑:程序博客网 时间:2024/06/11 01:34

78. Evaluate the following query:

SQL> SELECT TRUNC(ROUND(156.00,-1),-1)   

FROM DUAL;

What would be the outcome?

A. 16

B. 100

C. 160

D. 200

E. 150

Answer: C

  答案解析:

参考:http://blog.csdn.net/rlhua/article/details/12848395
ROUND(156.00,-1)=160,四舍五入,精确到十位
TRUNC(160,-1)=160,截断精确到十位。
实验验证:
scott@TESTDB> select round(156.00,-1) from dual;
 
ROUND(156.00,-1)
----------------
             160
 
scott@TESTDB> select trunc(160,-1) from dual;
 
TRUNC(160,-1)
-------------
          160