SIGN |
SIGN(n) |
Returns a value indicating the sign of n. The number returned by the SIGN function will be one of the following:
-1
The number is negative
0
The number is zero
1
The number is positive
Example
SQL> SELECT SIGN(76), SIGN(0), SIGN(-76.17) 2 FROM dual; SIGN(76) SIGN(0) SIGN(-76) ---------- ---------- ---------- 1 0 -1
Get Oracle SQL: the Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.