TRUNC(5.75, -1) (2) : TRUNC « Numerical Math Functions « Oracle PL/SQL Tutorial






SQL> select TRUNC(5.75, -1) from dual;

TRUNC(5.75,-1)
--------------
             0








14.26.TRUNC
14.26.1.TRUNC(x, [y]) gets the result of truncating the number x to an optional y decimal places.
14.26.2.TRUNC column value
14.26.3.TRUNC may have a second argument to handle precision: means the distance to the right of the decimal point
14.26.4.The second argument of TRUNC defaults to 0
14.26.5.The second argument of TRUNC, precision, may be negative, which means displacement to the left of the decimal point
14.26.6.TRUNC(5.75)
14.26.7.TRUNC(5.75, 1)
14.26.8.TRUNC(5.75, -1) (2)