Link Search Menu Expand Document

TRUNC

Returns the rounded absolute value of a numeric value. The returned value will always be rounded to less than the original value.

Syntax

TRUNC(<value>[, <decimal>])
Parameter Description
<value> Valid values include column names, functions that return a column with numeric values, and constant numeric values.
<decimal> Optional. An INTEGER constant that defines the decimal range of the returned value. By default, TRUNC returns whole numbers.

Example

SELECT
    TRUNC(-20.5);

Returns: -20

SELECT
    TRUNC(-99.999999, 3);

Returns: -99.999