FLOOR (Azure Cosmos DB)FLOOR (Azure Cosmos DB)
适用于:
SQL API
返回小于或等于指定数值表达式的最大整数。Returns the largest integer less than or equal to the specified numeric expression.
语法Syntax
FLOOR (<numeric_expr>)
参数Arguments
numeric_exprnumeric_expr
是一个数值表达式。Is a numeric expression.
返回类型Return types
返回一个数值表达式。Returns a numeric expression.
示例Examples
以下示例显示了如何对正值、负值和零值使用 FLOOR
函数。The following example shows positive numeric, negative, and zero values with the FLOOR
function.
SELECT FLOOR(123.45) AS fl1, FLOOR(-123.45) AS fl2, FLOOR(0.0) AS fl3
下面是结果集。Here is the result set.
[{fl1: 123, fl2: -124, fl3: 0}]
备注Remarks
此系统函数将从范围索引中获益。This system function will benefit from a range index.