Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 607 Bytes

File metadata and controls

34 lines (26 loc) · 607 Bytes
description
Computes the absolute value of a numeric expression.

ABS

Syntax

ABS(numeric_expression NUMERIC) → NUMERIC

  • numeric_expression: BINARY, DECIMAL, DOUBLE, FLOAT, INTEGER

Examples

{% code title="ABS example" %}

SELECT ABS(0.0)
-- 0.0

{% endcode %}

{% code title="ABS example" %}

SELECT ABS(-2)
-- 2

{% endcode %}

{% code title="ABS example" %}

SELECT ABS(NULL)
-- None

{% endcode %}