title | titleSuffix | description | author | ms.author | ms.reviewer | ms.service | ms.subservice | ms.topic | ms.devlang | ms.date | ms.custom |
---|---|---|---|---|---|---|---|---|---|---|---|
POWER |
Azure Cosmos DB for NoSQL |
An Azure Cosmos DB for NoSQL system function that returns a number multipled by itself a specified number of times. |
jcodella |
jacodel |
sidandrews |
cosmos-db |
nosql |
reference |
nosql |
02/27/2024 |
query-reference |
[!INCLUDENoSQL]
Returns the value of the specified expression multipled by itself the given number of times.
POWER(<numeric_expr_1>, <numeric_expr_2>)
Description | |
---|---|
numeric_expr_1 |
A numeric expression. |
numeric_expr_2 |
A numeric expression indicating the power to raise numeric_expr_1 . |
Returns a numeric expression.
The following example demonstrates raising a number to various powers.
:::code language="nosql" source="~/cosmos-db-nosql-query-samples/scripts/power/query.sql" highlight="2-9":::
:::code language="json" source="~/cosmos-db-nosql-query-samples/scripts/power/result.json":::
- This function doesn't use the index.