Home Privacy Policy Feedback Link to us Site Map Forums

Oracle/PLSQL: Sign Function


In Oracle/PLSQL, the sign function returns a value indicating the sign of a number.

The syntax for the sign function is:

sign( number )

number is the number to test for its sign.

If number < 0, then sign returns -1.
If number = 0, then sign returns 0.
If number > 0, then sign returns 1.


Applies To:

  • Oracle 8i, Oracle 9i, Oracle 10g, Oracle 11g

For example:

sign(-23) would return -1
sign(-0.001) would return -1
sign(0) would return 0
sign(0.001) would return 1
sign(23) would return 1
sign(23.601) would return 1