Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

TRUNC() - Remove decimal places

Function group: numeric function

TRUNC() determines the integer share of a numeric value.

TRUNC() performs no rounding in the case of non-integer values.


TRUNC ( expression )



expression

Numeric expression.
expression may not be a multiple value with dimension > 1.


Result

When expression returns the NULL value, the result is the NULL value.

Otherwise:


expression >= 0:

the largest integer which is less than or equal to the specified
numeric FLOOR(ausdruck).

expression < 0:

the smallest integer which is greater than or equal to the specified
numeric value, i.e. CEILING(expression).

Data type:

NUMERIC(p-s,0)
DECIMAL(q-s,0)

for data type of expression NUMERIC(p,s) or
DECIMAL(q,s) where p,q > s


like expression

for data type of expression integer numeric (SMALLINT,
INTEGER, NUMERIC(p,0), DECIMAL(q,0) or REAL,
DOUBLE PRECISION, FLOAT


Examples

TRUNC (3,14) returns the value 3.

TRUNC (-3,14) returns the value -3.