SEGNO
Sintassi
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> SIGN[SIGN]:::quoted
SIGN --> End((END))
Scopo
0 loSIGN-1 zero1
Vedi anche ABS.
Parametri:
- Dati inseriti (
decimal): Un numero.
Risultati: il segno come int32.
Esempi
L'esempio seguente restituisce il segno di un numero negativo, di uno zero e di un numero positivo:
select sign(-0.65565) negative
, sign(0) neutral
, sign(+20) positive
-------- -------- --------
-1 0 1
L'esempio seguente restituisce null poiché l'input è null:
select sign(null)
--------