TRUNC(a,n) is an arithmetic function with the following result (for the expressions a and n that are numbers):
TRUNC(a) – Truncation of the decimal places from a
TRUNC(a,n) – Truncation of the number a after n places after the decimal point
TRUNC(a,-n) – Setting n places of the number a before the decimal point to 0
a, n |
Result of the TRUNC(a,n) Function |
---|---|
n>0 |
Number a that is truncated n places after the decimal point |
n=0 |
Integer component of a |
n<0 |
Number a that is truncated s places before the decimal point |
n not specified |
As with n=0 |
n is not an integer |
The integer component of n is used and the result is as with n>0, n=0, or n<0 |
a is a floating point number |
Floating point number |
a is a fixed point number |
Fixed point number |
a is a NULL value |
NULL value |
a is a special NULL value |
Special NULL Value |