VeloDB Cloud
SQL Manual
Functions
math-functions
ceil

ceil

Description

Syntax:

BIGINT ceil(DOUBLE x)

This function returns the smallest integer that is greater than or equal to x.

Example

mysql> select ceil(1);
+-----------+
| ceil(1.0) |
+-----------+
|         1 |
+-----------+
mysql> select ceil(2.4);
+-----------+
| ceil(2.4) |
+-----------+
|         3 |
+-----------+
mysql> select ceil(-10.3);
+-------------+
| ceil(-10.3) |
+-------------+
|         -10 |
+-------------+

Keywords

CEIL