• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / Oracle / function / SIGN Function in Oracle SQL – PLSQL

SIGN Function in Oracle SQL – PLSQL

November 5, 2012 by techhoneyadmin

The SIGN function in Oracle SQL / PLSQL is used to get a value which indicates the sign of a number.

Syntax for the SIGN function in Oracle SQL / PLSQL is:

SELECT SIGN(N)
FROM table_name;

  • N is the number whose SIGN is to be determined.
  • If N >0 then 1 is returned
  • If N = 0 then 0 is returned
  • If N< 0 then -1 is returned

Example 1:

view source
print?
1SELECT SIGN(1.23456)
2FROM DUAL;

Will return “1”


Example 2:

view source
print?
1SELECT SIGN(0)
2FROM DUAL;

Will return “0”


Example 3:

view source
print?
1SELECT SIGN(-2.051)
2FROM DUAL;

Will return “-1”


Filed Under: function Tagged With: how to use sign function in oracle database query, how to use sign function in oracle plsql, how to use sign function in oracle sql, sign function in oracle plsql, sign function in oracle sql, SIGNPLSQL, syntax and example of sign function in oracle database query, syntax and example of sign function in oracle plsql, syntax and example of sign function in oracle sql, using sign function in oracle database query, using sign function in oracle plsql, using sign function in oracle sql

Copyright © 2025 · Parallax Pro on Genesis Framework · WordPress · Log in