SIGN
Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression.
Syntax​
SIGN ( numeric_expression )
Arguments​
numeric_expression
Is an expression of the exact numeric or approximate numeric data type category.
Return Type​
Returns values of type INT8.
Examples​
Examples in this section use the example blockchain.
This example shows the results of using the SIGN
function.
SELECT SIGN(real) FROM example;
Response:
SIGN(real) [FLOAT64]
NULL
0
1
1