SIGN
Description
Syntax
SIGN(number)Example
SIGN(-15)SIGN(0)SIGN(99.9)Example in context
p is Person
SIGN(p.account_balance)Last updated
Was this helpful?
SIGN returns the sign of a number as an integer: -1 if the number is negative, 0 if it is zero, and 1 if it is positive.
SIGN(number)Returns: -1, 0, or 1.
SIGN(-15)This returns -1.
SIGN(0)This returns 0.
SIGN(99.9)This returns 1.
p is Person
SIGN(p.account_balance)Returns -1 if the balance is negative, 0 if it is exactly zero, and 1 if it is positive. Useful for conditional logic without writing a full if/case expression.
Last updated
Was this helpful?
Was this helpful?
