Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.26 KB

File metadata and controls

54 lines (37 loc) · 1.26 KB
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

POWER (NoSQL query)

[!INCLUDENoSQL]

Returns the value of the specified expression multipled by itself the given number of times.

Syntax

POWER(<numeric_expr_1>, <numeric_expr_2>)  

Arguments

Description
numeric_expr_1 A numeric expression.
numeric_expr_2 A numeric expression indicating the power to raise numeric_expr_1.

Return types

Returns a numeric expression.

Examples

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":::

Remarks

  • This function doesn't use the index.

Related content