ARR_STR

Syntax

ARR_STR( array [ , delimiter [ , null_str ] ] )

Description

Concatenates elements of the array array using delimiter as a delimiter (comma by default) and null_str as a NULL string (NULL items are skipped by default).

See also STR

Argument types:

  • arrayArray of fractional numbers | Array of integers | Array of strings
  • delimiterString
  • null_strString

Return type: String

Note

Only constant values are accepted for the arguments (delimiter, null_str).

Examples

ARR_STR(ARRAY(1, 2, NULL, 4)) = 1,2,4
ARR_STR(ARRAY(1, 2, NULL, 4), ';') = 1;2;4
ARR_STR(ARRAY(1, 2, NULL, 4), ';', '*') = 1;2;*;4
ARR_STR(ARRAY('a', 'b', '', NULL), ';', '*') = a;b;;*

Data source support

ClickHouse 21.8, PostgreSQL 9.3.

Previous