SQRT (Azure Cosmos DB)SQRT (Azure Cosmos DB)

返回指定数值的平方根。Returns the square root of the specified numeric value.

语法Syntax

SQRT(<numeric_expr>)  

参数Arguments

numeric_exprnumeric_expr
是一个数值表达式。Is a numeric expression.

返回类型Return types

返回一个数值表达式。Returns a numeric expression.

示例Examples

以下示例返回数字 1-3 的平方根。The following example returns the square roots of numbers 1-3.

SELECT SQRT(1) AS s1, SQRT(2.0) AS s2, SQRT(3) AS s3  

下面是结果集。Here is the result set.

[{s1: 1, s2: 1.4142135623730952, s3: 1.7320508075688772}]  

备注Remarks

此系统函数不会使用索引。This system function will not utilize the index.

后续步骤Next steps