Топ-100
 
RDBMS Type: MySQL
Topic

Syntax:
SIGN(X)

Returns the sign of the argument as -1, 0, or 1, depending on whether X
is negative, zero, or positive.

URL: https://dev.mysql.com/doc/refman/8.0/en/mathematical-functions.html

Example

mysql> SELECT SIGN(-32);
-> -1
mysql> SELECT SIGN(0);
-> 0
mysql> SELECT SIGN(234);
-> 1