sign

Retrieve the sign of an expression

Syntax

sign(arith_expr)

Arguments

arith_expr An arithmetic expression.

Description

This scalar numeric function returns -1 if arith_expr is less than 0, 0 if arith_expr equals 0, and 1 if arith_expr is greater than 0.