SIGN returns a -1 if the number is negative, +1 if the number is positive, or 0 if the number is 0. : SIGN « Math Functions « SQL Server / T-SQL Tutorial






4> SELECT SIGN(-23)
5> GO

-----------
         -1

(1 rows affected)








11.19.SIGN
11.19.1.SIGN returns a -1 if the number is negative, +1 if the number is positive, or 0 if the number is 0.