Syntax
Parameters
-
array: the array whose elements you want to concatenate. Only the ARRAY data type is supported. -
sep: the delimiter that is used to separate the concatenated array elements. Only the VARCHAR data type is supported. -
null_replace_str: the string that is used to substituteNULLvalues. Only the VARCHAR data type is supported.
Return value
Returns a value of the VARCHAR data type.Usage notes
-
The value of the
arrayparameter must be a one-dimensional array. -
The
arrayparameter does not support DECIMAL values. -
If you set the
sepparameter toNULL, the return value isNULL. -
If you do not specify the
null_replace_strparameter,NULLvalues are discarded. -
If you set the
null_replace_strparameter toNULL, the return value isNULL.
Examples
Example 1: Concatenate the elements of an array. In this example, theNULL value in the array is discarded, and the concatenated array elements are separated by underscores (_).
NULL value in the array is substituted with NULL strings, and the concatenated array elements are separated by underscores (_).