Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

MySQL CEILING() function

CEILING() function

MySQL CEILING() returns the smallest integer value not less than the number specified as an argument. The synonym of CEILING() is CEIL().

Syntax:

CEILING(N);

Argument:

Name Description
N A number.

Syntax Diagram:

MySQL CEILING() Function - Syntax Diagram

MySQL Version: 5.6


Example:

Code:

SELECT CEILING(2.2536);

Explanation:

The above MySQL statement returns 3 which is the smallest integer value not less than the value specified (2.2536) in the argument.

Sample Output:

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

All Mathematical Functions

MySQL Mathematical Functions, slide presentation

Previous:CEIL()
Next: CONV()