Jump to: navigation, search

Mysql CEIL

From w3cyberlearnings

Contents

MySQL CEIL Function

This function returns the smallest value integer not less than X. This function is a synonym of CELING().

Syntax CEIL

X is a value to round.

CEIL(X);

Example 1

mysql> SELECT CEIL(2.5);
+-----------+
| CEIL(2.5) |
+-----------+
|         3 |
+-----------+
1 row in set (0.00 sec)

Example 2

mysql> SELECT CEIL(2.2);
+-----------+
| CEIL(2.2) |
+-----------+
|         3 |
+-----------+
1 row in set (0.00 sec)


Example 3

mysql> SELECT CEIL(-2.2);
+------------+
| CEIL(-2.2) |
+------------+
|         -2 |
+------------+
1 row in set (0.00 sec)

Related Links


Navigation
Web
SQL
MISC
References