Skip to main content

CEIL

Rounds the number up.

Syntax

CEIL(x)

Arguments

ArgumentsDescription
xThe numerical value.

Return Type

A numeric data type value which is the same as input type.

Examples

SELECT CEIL(1.23), typeof(ceil(3)), typeof(ceil(5.3));
+------------+------------------+-------------------+
| CEIL(1.23) | typeof(ceil(3)) | typeof(ceil(5.3)) |
+------------+------------------+-------------------+
| 2.0 | TINYINT UNSIGNED | DOUBLE |
+------------+------------------+-------------------+

SELECT CEIL(-1.23);
+----------------+
| CEIL((- 1.23)) |
+----------------+
| -1 |
+----------------+