TRUNC(x, [y]) gets the result of truncating the number x to an optional y decimal places. : TRUNC « Numerical Math Functions « Oracle PL/SQL Tutorial






If y is omitted, x is truncated to zero decimal places.

If y is negative, x is truncated to the left of the decimal point.

The following example displays truncating 5.75 to zero, 1, and - 1 decimal places:

SQL> SELECT TRUNC(5.75), TRUNC(5.75, 1), TRUNC(5.75, -1) FROM dual;

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

SQL>








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)