September 2000
Intermediate to advanced
418 pages
11h 5m
English
| TRUNC |
TRUNC (n [,m]) |
Truncates a number to a specific number of decimal places.
n
Specifies a number to be truncated.
m
Specifies the number of decimal places to preserve in the result. Truncating all decimal places is the default. Negative values for m result in digits being truncated to the left of the decimal point.
SQL> SELECT TRUNC(99.99), TRUNC(99.99,1), TRUNC(99.99,-1)
2 FROM dual;
TRUNC(99.99) TRUNC(99.99,1) TRUNC(99.99,-1)
------------ -------------- ---------------
99 99.9 90
|
Read now
Unlock full access