---
title: "QUOTE_NULLABLE"
description: "The QUOTE_NULLABLE SQL function quotes a text for use as a literal within an SQL query, identical to QUOTE_LITERAL."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/quote-nullable
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/quote-nullable
updated: 2026-08-09T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> QUOTE_NULLABLE[QUOTE_NULLABLE]:::quoted
    QUOTE_NULLABLE --> End((END))
```

## Purpose
The `QUOTE_NULLABLE` SQL function quotes a text for use as a literal within an SQL query, identical to [[QUOTE_LITERAL]]. However, when the input is `null` or empty the function returns `null`.

See also [[QUOTE_IDENT]] and [[QUOTE_LITERAL]].

Parameters:
- Literal (`varchar2`): the text to quote.

Returns: the quoted literal as `varchar2`. Returns `null` when the input is `null` or empty.

## Examples
The following example quotes `abc`:
```sql
select quote_nullable('abc')

-------------------
"abc"
```
The following example quotes `null`; the output is empty:
```sql
select quote_nullable(null)

-------------------

```