ABS (NoSQL query)
APPLIES TO: NoSQL
Returns the absolute (positive) value of the specified numeric expression.
Syntax
ABS(<numeric_expr>)
Arguments
Description | |
---|---|
numeric_expr |
A numeric expression. |
Return types
Returns a numeric expression.
Examples
The following example shows the results of using this function on three different numbers.
SELECT VALUE {
absoluteNegativeOne: ABS(-1),
absoluteZero: ABS(0),
absoluteOne: ABS(1)
}
[
{
"absoluteNegativeOne": 1,
"absoluteZero": 0,
"absoluteOne": 1
}
]
Remarks
- This function benefits from the use of a range index.
Related content
Atsauksmes
https://aka.ms/ContentUserFeedback.
Drīzumā: 2024. gada laikā mēs pakāpeniski pārtrauksim izmantot “GitHub problēmas” kā atsauksmju par saturu mehānismu un aizstāsim to ar jaunu atsauksmju sistēmu. Papildinformāciju skatiet:Iesniegt un skatīt atsauksmes par