16.20 - Usage Notes - Teradata Database

Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates

prodname
Advanced SQL Engine
Teradata Database
vrm_release
16.20
created_date
March 2019
category
Programming Reference
featnum
B035-1145-162K

For all numeric types except FLOAT/REAL/DOUBLE PRECISION, SIGN will return the following:

  • If numeric_value is < 0, -1 is returned.
  • If numeric_value is = 0, 0 is returned.
  • If numeric_value is > 0, 1 is returned.

For FLOAT/REAL/DOUBLE PRECISION, SIGN will return the following:

  • If numeric_value is < 0, -1 is returned.
  • If numeric_value is >= 0, 1 is returned.

If the input argument is NULL, the function returns NULL.