ABS

All functions > MATH > ABS

Returns the absolute value of a number.

Syntax

ABS(number: T) → T
sql

Type Parameters:

  • T: Any numeric type (TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, DECIMAL)

Arguments

ParameterTypeRequiredDescription
numberTYesThe number to get the absolute value of

Returns

The absolute (non-negative) value - same type as input

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

Last update at: 2025/12/05 16:03:14
Last updated: 2025-12-05 16:07:55