Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

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

Copy
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:

Copy
select ceiling(commission) from sales where salesid=10000; ceiling --------- 29 (1 row)