The SIGN function determines whether a number is negative, 0, or positive.
If the number is negative, it returns -1,
If the number is 0, it returns 0,
If the number is positive, it returns +1
Look at the example;
1 2 3 4 5 | SELECT SIGN(-34.234), SIGN(-34), SIGN(0), SIGN(56.45), SIGN(56) |

![]()
Database Tutorials MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux 