SIGN function in Oracle

SIGN is one of the vital Numeric/Math functions of Oracle. It is used to get a value indicating the sign of a number. The SIGN function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.

Syntax:

SIGN ( number )

Parameters:
number: It is used to specify the numbers to be tested for its sign.

Example 1:

SIGN (10)

Output:

1

Explanation:
The SIGN function returns 1, if number is greater than 0.

Example 2:

SIGN (0)

Output:

0

Explanation:
The SIGN function returns 0, if number is equal to 0.

Example 3:

SIGN (-10)

Output:

-1

Explanation:
The SIGN function returns -1, if number is less than 0.