trunc
Rounds the input expression down to the nearest (or equal) integer closer to zero.
Syntax
Section titled “Syntax”trunc( <input_expr> )
Returns
Section titled “Returns”The return type is float.
Arguments
Section titled “Arguments”<input_expr>
Section titled “<input_expr>”The value or expression to operate on. The data type should be float.
Examples
Section titled “Examples”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 |+----------------+------------------+------------+--------------+