ARRAY

Syntax

ARRAY( value_1, value_2, value_3 [ , ... ] )

Description

Returns an array containing the passed values.

Argument types:

  • value_1Fractional number | Integer | String
  • value_2Fractional number | Integer | String
  • value_3Fractional number | Integer | String

Return type: Depends on argument types

Note

All passed values must be of the same type or NULL. At least one value must be non-NULL.

Examples

ARRAY(1, 2, NULL, 3)
ARRAY('a', 'b', NULL, 'c')
ARRAY(0, 2.3, NULL, 0.18)

Data source support

ClickHouse 21.8, PostgreSQL 9.3.

Previous