Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

array_concat function

Focus mode
array_concat function - Amazon Redshift

The 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 arrays.

Syntax

array_concat( super_expr1, super_expr2 )

Arguments

super_expr1

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

super_expr2

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)

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.