Purpose
This function returns the largest integer less than or equal to the numeric value numeric_expression.
Syntax
FLOOR (numeric_expression)
Parameters
numeric_expression is a parameter of a numeric data type (NUMBER, FLOAT, BINARY_FLOAT, and BINARY_DOUBLE) or a parameter that can be implicitly converted to a numeric data type.
Return type
The return type is the same as the data type of the parameter numeric_expression.
Examples
Return the largest integers less than or equal to -1.5, 1.5, 2, and 6-9.5.
obclient> SELECT FLOOR(-1.5),FLOOR(1.5),FLOOR(2),FLOOR(6-9.5) FROM DUAL;
+-------------+------------+----------+--------------+
| FLOOR(-1.5) | FLOOR(1.5) | FLOOR(2) | FLOOR(6-9.5) |
+-------------+------------+----------+--------------+
| -2 | 1 | 2 | -4 |
+-------------+------------+----------+--------------+
1 row in set
