Oracle® TimesTen In-Memory Database SQL Reference Release 11.2.1 Part Number E13070-04 |
|
|
View PDF |
Returns a number truncated to a certain number of decimal places.
SQL syntax
TRUNC (Expression [,m])
Parameters
TRUNC has the parameters:
Parameter | Description |
---|---|
Expression |
The Expression to truncate. Operands must be of type NUMBER. An error is returned if operands are not of type NUMBER. The value returned is of type NUMBER. |
[,m ] |
The number of decimal places to truncate to. If m is omitted, then the number is truncated to 0 places. The value of m can be negative to truncate (make zero) m digits left of the decimal point. |
Examples
SELECT TRUNC (15.79,1) FROM dual; < 15.7 > 1 row found. SELECT TRUNC (15.79,-1) FROM dual; < 10 > 1 row found.