📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

SIGN



Returns the sign of the argument as -1, 0, or 1, depending on whether x is negative, zero, or positive or NULL if the argument was NULL.

Syntax

SIGN( <x> )

Examples

SELECT SIGN(0); ┌─────────┐ │ sign(0) │ ├─────────┤ │ 0 │ └─────────┘

Was this page helpful?