ID EN
Mathematical Functions

CEILING(X)

MySQL 8.4

Returns the smallest integer value not less than X. Returns NULL if X is NULL.

Syntax

MYSQL
SELECT CEILING(1.23);
2
SELECT CEILING(-1.23);
-1

Examples

Example

For exact-value numeric arguments, the return value has an exact-value numeric type. For string or floating-point arguments, the return value has a floating-point type.

MYSQL
SELECT CEILING(1.23);
2
SELECT CEILING(-1.23);
-1