---
title: "SEGNO"
description: "La funzione SQL SIGN restituisce il segno di un numero, con -1 che rappresenta un numero negativo, 1 un numero positivo e 0 lo zero."
language: it
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/it/docs/invantive-universalsql/grammar/sql-functions/sign
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/sign
updated: 2026-12-04T14:25:39Z
license: https://documentation.invantive.eu/it/
---

## Sintassi
```mermaid
%%{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 lo`SIGN`-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:
```sql
select sign(-0.65565) negative
,      sign(0) neutral
,      sign(+20) positive

-------- -------- --------
-1       0        1
```
L'esempio seguente restituisce `null` poiché l'input è `null`:
```sql
select sign(null)

--------

```

