Rediger

Del via


CEILING (NoSQL query)

APPLIES TO: NoSQL

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

Syntax

CEILING(<numeric_expr>)  

Arguments

Description
numeric_expr A numeric expression.

Return types

Returns a numeric expression.

Examples

The following example shows positive numeric, negative, and zero values evaluated with this function.

SELECT VALUE {
    ceilingPositiveInteger: CEILING(123.45), 
    ceilingNegativeInteger: CEILING(-45.72),
    ceilingZero: CEILING(0)
}
[
  {
    "ceilingPositiveInteger": 124,
    "ceilingNegativeInteger": -45,
    "ceilingZero": 0
  }
]

Remarks