FLOOR (NoSQL query)
APPLIES TO: NoSQL
Returns the largest integer less than or equal to the specified numeric expression.
Syntax
FLOOR(<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 {
floorPostiveNumber: FLOOR(62.6),
floorNegativeNumber: FLOOR(-145.12),
floorSmallNumber: FLOOR(0.2989),
floorZero: FLOOR(0.0),
floorNull: FLOOR(null)
}
[
{
"floorPostiveNumber": 62,
"floorNegativeNumber": -146,
"floorSmallNumber": 0,
"floorZero": 0
}
]
Remarks
- This system function benefits from a range index.