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 function

Focus mode
array function - Amazon Redshift

Creates an array of the SUPER data type.

Syntax

ARRAY( [ expr1 ] [ , expr2 [ , ... ] ] )

Argument

expr1, expr2

Expressions of any Amazon Redshift data type except date and time types, since Amazon Redshift doesn't cast the date and time types to the SUPER data type. The arguments don't need to be of the same data type.

Return type

The array function returns the SUPER data type.

Example

The following examples show an array of numeric values and an array of different data types.

--an array of numeric values select array(1,50,null,100); array ------------------ [1,50,null,100] (1 row) --an array of different data types select array(1,'abc',true,3.14); array ----------------------- [1,"abc",true,3.14] (1 row)

On this page

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