Skip to content

trunc

Rounds the input expression down to the nearest (or equal) integer closer to zero.

trunc( <input_expr> )

The return type is float.

The value or expression to operate on. The data type should be float.

SELECT trunc(135.135), trunc(-975.975), trunc(2.5), trunc(-2.5);
+----------------+------------------+------------+--------------+
| TRUNC(135.135) | TRUNC(- 975.975) | TRUNC(2.5) | TRUNC(- 2.5) |
+----------------+------------------+------------+--------------+
| 135.0 | -975.0 | 2.0 | -2.0 |
+----------------+------------------+------------+--------------+
ScopeDB Logo ScopeDB
© 2025 ScopeDB. All rights reserved.