floor
Description
Syntax:
BIGINT floor(DOUBLE x)
This function returns the largest integer that is less than or equal to x
.
Example
mysql> select floor(1);
+------------+
| floor(1.0) |
+------------+
| 1 |
+------------+
mysql> select floor(2.4);
+------------+
| floor(2.4) |
+------------+
| 2 |
+------------+
mysql> select floor(-10.3);
+--------------+
| floor(-10.3) |
+--------------+
| -11 |
+--------------+
Keywords
FLOOR