---
title: "CONCAT"
description: "The CONCAT SQL function concatenates the left and right values together as a varchar2 or blob."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/concat
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/concat
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)) --> CONCAT[CONCAT]:::quoted
    Start -->| | CONCAT_OP["||"]:::quoted
    CONCAT --> End((END))
    CONCAT_OP --> End((END))
```

## Purpose
The `CONCAT` SQL function concatenates the left and right values together as a `varchar2` or `blob`. 

Parameters:
- Position 1 (`varchar2` or `blob`): a value.
- Position n (`varchar2` or `blob`): more values.

Returns: concatenation of the parameters. Returns a `blob` when at least one value is a `blob` and `varchar2` otherwise. A `null` value is considered an empty text.

The `CONCAT` SQL function accepts an arbitrary number of parameters, whereas the `||` operator is used in an infix notation.

Use of `CONCAT` instead of the `||` operator is recommended for performance reasons when 50 or more texts are being concatenated together.

## Examples
The following example retrieves the concatenation of `abc` and `def`:
```sql
select concat('abc', 'def')

--------
abcdef
```
The following example retrieves the concatenation of `abc`, `null` and `def`:
```sql
select concat('abc', null, 'def')

--------
abcdef
```
The following example retrieves the concatenation of `abc`, `null` and `def` using the infix concatenation operator `||`:
```sql
select 'abc' || null || 'def'

--------
abcdef
```

