SIGN function [Numeric]

Function

Returns the sign of a number.

Syntax

SIGNnumeric-expression )

Parameters

numeric-expression The number for which the sign is to be returned.

Example

The following statement returns the value -1:

SELECT SIGN( -550 ) FROM iq_dummy

Usage

For negative numbers, SIGN returns -1.

For zero, SIGN returns 0.

For positive numbers, SIGN returns 1.

Standards and compatibility