ABS

All functions > MATH > ABS

Returns the absolute value of a number.

Signatures

Returns: The absolute (non-negative) value

ABS(number: T) → T
sql
ParameterTypeRequiredDescription
numberTYesThe number to get the absolute value of

Notes

  • Removes the sign from a number, making it positive
  • Returns NULL if the input is NULL
  • ABS(0) = 0
  • ABS(positive) = positive
  • ABS(negative) = positive

Examples

FeatureQL
SELECT
    f1 := ABS(-10),  -- Negative integer
    f2 := ABS(5),  -- Positive integer
    f3 := ABS(0),  -- Zero
    f4 := ABS(-3.7e0)  -- Negative decimal
;
Result
f1 BIGINTf2 BIGINTf3 BIGINTf4 VARCHAR
10503.7

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19