CEILING (or CEIL) Function
The CEILING or CEIL function is used to round a number up to the next whole number. (The FLOOR Function rounds a number down to the next whole number.)
Syntax
CEIL | CEILING(number)
Arguments
- number
-
DOUBLE PRECISION number to be rounded.
Return Type
CEILING and CEIL return an integer.
Example
Calculate the ceiling of the commission paid for a given sales transaction:
select ceiling(commission) from sales where salesid=10000; ceiling --------- 29 (1 row)