CEILING
Declaration
CEILING(X)
Description
Returns the smallest integer greater than or equal to X. This function is an alias of CEIL().
Supports comparison operations, with results of type BOOL, which are converted to the numeric type. The result is 1 (TRUE) or 0 (FALSE).
If the input is NULL, the return value is NULL.
If the input is a string of pure numbers, it is automatically converted to the numeric type.
The return value is converted to a BIGINT.
Examples
SELECT CEILING(1.23);
+---------------+
| CEILING(1.23) |
+---------------+
| 2 |
+---------------+
1 row in set (0.001 sec)
SELECT CEILING(-1.23);
+----------------+
| CEILING(-1.23) |
+----------------+
| -1 |
+----------------+
1 row in set (0.001 sec)