Returns the sign of a number.
SIGN ( numeric-expression )
Parameter
Description
numeric-expression
The number for which the sign is to be returned.
SMALLINT
The following statement returns the value -1:
SELECT SIGN( -550 ) FROM iq_dummy
For negative numbers, SIGN returns -1.
For zero, SIGN returns 0.
For positive numbers, SIGN returns 1.
SQL—Vendor extension to ISO/ANSI SQL grammar.
Sybase—Compatible with Adaptive Server Enterprise.