Contents:
Calculates the smallest integer greater than the numeric expression given.
See also ROUND, FLOOR.
CEILING( expr ) CEIL ( expr )
Parameter
Description
expr
Numeric expression
CEIL Always returns a floating point result.
CEIL
If the input value is NULL, the result is NULL.
numbers=> SELECT FLOOR(x), CEIL(x), ROUND(x) . FROM (VALUES (0.0001), (-0.0001) . , (PI()), (-2.718281), (500.1234)) as t(x); floor | ceil | round ------+------+------ 0 | 1 | -0 3 | 4 | 3 -3 | -2 | -3 500 | 501 | 500