Purpose
FLOOR() returns the largest integer that is less than or equal to the value of numeric_expression.
Syntax
FLOOR (numeric_expression)
Parameters
numeric_expression is of a numeric data type such as NUMBER, FLOAT, BINARY_FLOAT, or BINARY_DOUBLE or any data type that can be implicitly converted to a numeric data type.
Return type
The return type is the same as the data type of numeric_expression.
Examples
The following example returns the largest integers that are respectively 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