---
title: "NVL"
description: "La funci\u00F3n SQL NVL combina todos los valores entre s\u00ED."
language: es
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/es/docs/invantive-universalsql/grammar/sql-functions/nvl
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/nvl
updated: 2026-12-04T14:07:38Z
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)) --> NVL[NVL]:::quoted
    NVL --> End((END))
```

## Propósito
La función SQL `NVL` agrupa todos los valores.

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

Parámetros:
- Posición 1 (`ANY`): un valor.
- Posición n (opcional, `ANY`): más valores.

Devuelve: Todos los valores fusionados.

## Ejemplos
El siguiente ejemplo recupera el primer valor que no sea `null`:
```sql
select nvl(null, 'a')

-------------------
a
```
El siguiente ejemplo recupera el primer valor que no sea `null` de una lista más larga de valores:
```sql
select nvl(null, null, 'b', null, null)

-------------------
b
```

