Course
Simulator
More
Premium
Log in
SQL Function Reference
Functions
SIGN
SIGN
Returns the sign of the given number: -1 for negative values, 1 for positive values, and 0 for 0
MySQL
SIGN
(
[
num
]
)
Examples
MySQL
SELECT
SIGN
(
-
2
)
;
MySQL
SELECT
SIGN
(
2
)
;
MySQL
SELECT
SIGN
(
0
)
;