MariaDB: CEIL Function
This MariaDB tutorial explains how to use the MariaDB CEIL function with syntax and examples.
Description
The MariaDB CEIL function returns the smallest integer value that is greater than or equal to a number.
Syntax
The syntax for the CEIL function in MariaDB is:
CEIL( number )
Parameters or Arguments
- number
- The value used to find the smallest integer value.
Note
- The CEIL function is a synonym for the CEILING function.
- See also the FLOOR, ROUND, CEILING, and TRUNCATE functions.
Applies To
The CEIL function can be used in the following versions of MariaDB:
- MariaDB 10
Example
Let's look at some MariaDB CEIL function examples and explore how to use the CEIL function in MariaDB.
For example:
SELECT CEIL(12.5); Result: 13 SELECT CEIL(12.1); Result: 13 SELECT CEIL(12); Result: 12 SELECT CEIL(-12.7); Result: -12 SELECT CEIL(-12.3); Result: -12 SELECT CEIL(-12); Result: -12
Advertisements