Mega Code Archive

 
Categories / MySQL Tutorial / Math Numeric Functions
 

CEILING(X), CEIL(X) returns the smallest integer value not less than X

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