floor

description

Syntax

BIGINT floor(DOUBLE x) Returns the largest integer value less than or equal to x.

example

1. mysql> select floor(1);
2. +------------+
3. | floor(1.0) |
4. +------------+
5. |          1 |
6. +------------+
7. mysql> select floor(2.4);
8. +------------+
9. | floor(2.4) |
10. +------------+
11. |          2 |
12. +------------+
13. mysql> select floor(-10.3);
14. +--------------+
15. | floor(-10.3) |
16. +--------------+
17. |          -11 |
18. +--------------+

keywords

1. FLOOR