SQUARE (NoSQL query)
APPLIES TO:
NoSQL
Returns the square of the specified numeric value.
Syntax
SQUARE(<numeric_expr>)
Arguments
Description | |
---|---|
numeric_expr |
A numeric expression. |
Return types
Returns a numeric expression.
Examples
The following example returns the squares of various numbers.
SELECT VALUE {
squareZero: SQUARE(0),
squareOne: SQUARE(1),
squareTwo: SQUARE(2),
squareThree: SQUARE(3),
squareNull: SQUARE(null)
}
[
{
"squareZero": 0,
"squareOne": 1,
"squareTwo": 4,
"squareThree": 9
}
]
Remarks
- This function doesn't use the index.
Related content
Tagasiside
https://aka.ms/ContentUserFeedback.
Varsti tulekul: 2024. aasta jooksul tühistame GitHubi probleemide funktsiooni sisutagasiside mehhanismina ja asendame selle uue tagasisidesüsteemiga. Lisateabe saamiseks vtEsita ja vaata tagasisidet