Skip to main content
Version: 0.0.1

CEILING

Categories: Math

CEILING

Returns the nearest equal or larger value of the input expression. Can also be called using CEIL().

Syntax

CEILING(numeric_expression NUMERIC) → INTEGER

  • numeric_expression: The number (DOUBLE, FLOAT, INTEGER) for which you want to compute the ceiling.

Examples

{{< codeheader "CEILING example" >}}

SELECT CEILING(3.1459)
-- 4

{{< codeheader "CEILING example" >}}

SELECT CEIL(37.775420706711)
-- 38

{{< codeheader "CEILING example" >}}

SELECT CEIL(-37.775420706711)
-- -37

{{< codeheader "CEILING example" >}}

SELECT CEIL(0)
-- 0