Oracle Built In Functions:SIGN Function

In Oracle the SIGN function returns value indicating sign of a number

Syntax

SIGN(num)

In Oracle the SIGN function returns value indicating sign of a number
If num<0, the function returns -1.
If num=0, the function returns 0.
If num>0, the function returns 1.

Example

SELECT SIGN(-20) “Sign” FROM DUAL;

Sign
———-
-1

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




CAPTCHA Image CAPTCHA Audio
Refresh Image

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .