description |
---|
Returns the sign of the input expression. |
- numeric_expression: Input expression.
Examples
{% code title="SIGN example" %}
SELECT SIGN(10.3)
-- 1
{% endcode %}
- numeric_expression: Input expression.
Examples
{% code title="SIGN example" %}
SELECT SIGN(-5)
-- -1
{% endcode %}
- numeric_expression: Input expression.
Examples
{% code title="SIGN example" %}
SELECT SIGN(24)
-- 1
{% endcode %}
- numeric_expression: Input expression.
Examples
{% code title="SIGN example" %}
SELECT SIGN(0.0)
-- 0
{% endcode %}
1 is returned if the input expression is positive. -1 is returned if the input expression is negative. 0 is returned if the input expression is 0.