إشعار
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تسجيل الدخول أو تغيير الدلائل.
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تغيير الدلائل.
The INTSUB function returns the result of subtracting the second integer value from the first.
Syntax
INTSUB(<numeric_expr_1>, <numeric_expr_2>)
Arguments
| Description | |
|---|---|
numeric_expr_1 |
The first numeric expression. |
numeric_expr_2 |
The second numeric expression. |
Return types
Returns a numeric expression.
Examples
This section contains examples of how to use this query language construct.
Subtract integer values
In this example, the INTSUB function is used to subtract two numbers.
SELECT VALUE {
negativeResult: INTSUB(25, 50),
positiveResult: INTSUB(25, 15),
subtractSameNumber: INTSUB(25, 25),
subtractZero: INTSUB(25, 0),
subtractDecimal: INTSUB(25, 2.5)
}
[
{
"negativeResult": -25,
"positiveResult": 10,
"subtractSameNumber": 0,
"subtractZero": 25
}
]