ARR_STR
Written by
Updated at June 27, 2023
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:
array
—Array of fractional numbers | Array of integers | Array of strings
delimiter
—String
null_str
—String
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
.