Invantive-DokumentationTeil von Invantive Cloud
Invantive SupportforenAnmelden / Eintragen

NVL

Syntax

%%{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))

Anwendung

Die SQL-Funktion NVL fasst alle Werte zusammen.

Siehe auch COALESCE.

Parameter:

  • Position 1 (ANY): ein Wert.
  • Position n (optional, ANY): weitere Werte.

Rückgabewert: Alle Werte werden zusammengefasst.

Beispiele

Das folgende Beispiel ruft den ersten Wert ab, der nicht null ist:

select nvl(null, 'a')

-------------------
a

Das folgende Beispiel ruft den ersten Wert aus einer längeren Liste von Werten ab, der nicht null lautet:

select nvl(null, null, 'b', null, null)

-------------------
b