Evaluate the following SQL query;
select trunc(round(156.00,-1)-1) from dual;
What would be the outcome?A. 200
B. 16
C. 160
D. 150
E. 100
Answer: C
Function Purpose
ROUND(column|expression, n) Rounds the column, expression, or value to n decimal places or, if
n is omitted, no decimal places (If n is negative, numbers to the left of decimal point are rounded.)
TRUNC(column|expression, n) Truncates the column, expression, or value to n decimal places or,
if n is omitted, n defaults to zero
ROUND() 函数
ROUND 函数用于把数值字段舍入为指定的小数位数。round(156.00,-1)=160
TRUNC()函数
TRUNC 函数用于把数值字段截取,默认取整,没有四舍五入。TRUNC(160,-1)=160