Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

SIGN function (ODBC compatible)

Syntax

SIGN ( expression )

Description

The scalar function SIGN returns 1 if expression is positive, -1 if expression is negative, or zero if it is zero.

Example

SELECT SIGN(-14) 'Sign'

FROM ADMIN.SYSCALCTABLE;

Notes

  • Expression must evaluate to a numeric data type.

TOCIndex