> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ARRAY_CONCAT

> Concatenates arrays in argument order.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

Skips NULL arrays; returns NULL only when every input array is NULL. NULL elements inside arrays are retained.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
array_concat(array, ...)
```

## Arguments

Type notation used below:

* T is the array element type: BOOLEAN, TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, DECIMAL(p, s), STRING, BINARY, DATE, TIME, TIMESTAMP, ARRAY, MAP or STRUCT.

| Name | Type | Required | Description |
| - | - | - | - |
| array | ARRAY\<T> | Yes | An input array; additional compatible arrays are accepted. Nested elements/fields must satisfy the same element-type restrictions. This argument can repeat. |

## Returns

* Type: ARRAY\<T>
* Possible values: All elements of the non-NULL input arrays.
* NULL behavior: Skips NULL arrays; returns NULL only when every input array is NULL. NULL elements inside arrays are retained.
* Shape: The sum of non-NULL input lengths.
* Ordering: Argument order, retaining order within each array.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Yes |

## Usage notes

* Compatible element types are promoted to a common result type.
* Supply one or more arrays. Nested dimensions and compatible element types are combined as needed. Incompatible element types raise an error.
* INTEGER and INT mean the same type; STRING means VARCHAR text. NULL can be used with a supported type. Cast NULL explicitly when its type would otherwise be unclear.

## Examples

### Typical behavior

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT array_concat(ARRAY[1, 2], ARRAY[3, NULL]) AS "value";
```

| value |
| - |
| \[1,2,3,null] |

### Join arrays of strings

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT array_concat(ARRAY('red'), ARRAY('blue', 'green')) AS colors;
```

| colors |
| - |
| \["red","blue","green"] |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.