FLOOR
Rounds the number down.
Syntax
FLOOR(x)
Arguments
Arguments | Description |
---|---|
x | The numerical value. |
Return Type
A numeric data type value which is the same as input type.
Examples
SELECT FLOOR(1.23);
+-------------+
| FLOOR(1.23) |
+-------------+
| 1 |
+-------------+
SELECT FLOOR(-1.23);
+-----------------+
| FLOOR((- 1.23)) |
+-----------------+
| -2 |
+-----------------+