Scalar function
Returns NULL when an argument is NULL.
Syntax
Scalar
Arguments
Returns
- Type: Same SQL type as value
- Possible values: The nonnegative magnitude; NaN remains NaN.
- NULL behavior: Returns NULL when an argument is NULL.
Properties
Usage notes
- INTEGER and INT mean the same type; STRING means VARCHAR text. NULL can be used with a supported type. Cast NULL explicitly when its type would otherwise be unclear.
- A DECIMAL result keeps its precision and scale as described above. Depending on decimal settings, query tools may report DOUBLE instead; this does not convert the returned value.
Examples
Limitations
- The minimum signed value of TINYINT, SMALLINT, INT or BIGINT cannot be made positive in the same type and raises an overflow error.
- ABS supports numeric inputs. INTERVAL input is not supported.
Last modified on October 15, 2026