CEILING (Azure Cosmos DB)

APPLIES TO: SQL API

Returns the smallest integer value greater than, or equal to, the specified numeric expression.

Syntax

CEILING (<numeric_expr>)  

Arguments

numeric_expr
Is a numeric expression.

Return types

Returns a numeric expression.

Examples

The following example shows positive numeric, negative, and zero values with the CEILING function.

SELECT CEILING(123.45) AS c1, CEILING(-123.45) AS c2, CEILING(0.0) AS c3  

Here is the result set.

[{c1: 124, c2: -123, c3: 0}]  

Remarks

This system function will benefit from a range index.

Next steps