Declaration
CEILING(X)
Description
Returns the smallest integer greater than or equal to X. This function is an alias for CEIL().
Comparison operations are supported, with the result being a BOOL value. This value is converted to a numeric type, resulting in 1 (TRUE) or 0 (FALSE).
If NULL is input, the return value is NULL.
If you enter a string of pure digits, it can be automatically converted to the numeric type.
The return value is converted to a BIGINT.
Examples
obclient> SELECT CEILING(1.23);
+---------------+
| CEILING(1.23) |
+---------------+
| 2 |
+---------------+
1 row in set
obclient> SELECT CEILING(-1.23);
+----------------+
| CEILING(-1.23) |
+----------------+
| -1 |
+----------------+
1 row in set