View a markdown version of this page

ARRAY_CONCAT function - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Amazon Redshift will no longer support the use of Python UDFs after June 30, 2026. We will start enforcing it in phases. For more information on the details of Python end of life and migration options, see the blog post that was published on June 30, 2025.

ARRAY_CONCAT function

Concatenates two arrays to create an array that contains all the elements in the first array followed by all the elements in the second array. The two arguments must be valid SUPER arrays.

Syntax

ARRAY_CONCAT( array1, array2 )

Arguments

array1

The value that specifies the first of the two arrays to concatenate.

array2

The value that specifies the second of the two arrays to concatenate.

Return type

The ARRAY_CONCAT function returns a SUPER data value.

Example

The following examples shows concatenation of two arrays of the same type and concatenation of two arrays of different types.

-- concatenating two arrays SELECT ARRAY_CONCAT(ARRAY(10001,10002),ARRAY(10003,10004)); array_concat ------------------------------------ [10001,10002,10003,10004] (1 row) -- concatenating two arrays of different types SELECT ARRAY_CONCAT(ARRAY(10001,10002),ARRAY('ab','cd')); array_concat ------------------------------ [10001,10002,"ab","cd"] (1 row)

See also