---
title: ES|QL MV_CONCAT function
description: 
url: https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/mv-functions/mv_concat
products:
  - Elasticsearch
---

# ES|QL MV_CONCAT function
## Syntax

![Embedded](https://www.elastic.co/docs/reference/query-languages/esql/images/functions/mv_concat.svg)


## Parameters

<definitions>
  <definition term="string">
    Expression that can be null, a single value, or multiple values.
  </definition>
  <definition term="delim">
    Delimiter.
  </definition>
</definitions>


## Description

Converts a multivalued string expression into a single valued column containing the concatenation of all values separated by a delimiter.

## Supported types


| string  | delim   | result  |
|---------|---------|---------|
| keyword | keyword | keyword |
| keyword | text    | keyword |
| text    | keyword | keyword |
| text    | text    | keyword |


## Examples

```esql
ROW a=["foo", "zoo", "bar"]
| EVAL j = MV_CONCAT(a, ", ")
```


| a:keyword             | j:keyword       |
|-----------------------|-----------------|
| ["foo", "zoo", "bar"] | "foo, zoo, bar" |

To concat non-string columns, call [`TO_STRING`](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/type-conversion-functions/to_string) first:
```esql
ROW a=[10, 9, 8]
| EVAL j = MV_CONCAT(TO_STRING(a), ", ")
```


| a:integer  | j:keyword  |
|------------|------------|
| [10, 9, 8] | "10, 9, 8" |