UNARY_MINUS()

All functions > MATH > UNARY_MINUS()

Negates a numeric expression (unary minus).

Signatures

Returns: Same type as the operand

UNARY_MINUS(expr: T) → T
sql
ParameterTypeRequiredDescription
exprTYesOperand

With:

  • T : Any numeric type

Notes

  • Written in FeatureQL as a leading - before an expression (for example -AMOUNT).
  • NULL in, NULL out.

Examples

FeatureQL
SELECT
    f1 := UNARY_MINUS(3), -- Function call form
    f2 := -3, -- Operator form on integer literal
    f3 := -1.0E0 -- DOUBLE literal
;
Result
f1 BIGINTf2 BIGINTf3 VARCHAR
-3-3-1.0

Last update at: 2026/05/26 17:22:09