---
title: "FIRMA"
description: "La funci\u00F3n SQL SIGN devuelve el signo de un n\u00FAmero, con -1 que representa un n\u00FAmero negativo, 1 un n\u00FAmero positivo y 0 un cero."
language: es
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/es/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:35Z
license: https://documentation.invantive.eu/es/
---

## Sintaxis
```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))
```

## Propósito
La función SQL `SIGN` devuelve el signo de un número, donde -1 representa un número negativo, 1 un número positivo y 0 el cero.

Véase también [[ABS]].

Parámetros:
- Entrada (`decimal`): Un número.

Resultados: el signo como `int32`.

## Ejemplos
En el siguiente ejemplo se obtiene el signo de un número negativo, un cero y un número positivo:
```sql
select sign(-0.65565) negative
,      sign(0) neutral
,      sign(+20) positive

-------- -------- --------
-1       0        1
```
El siguiente ejemplo devuelve `null`, ya que la entrada es `null`:
```sql
select sign(null)

--------

```

