ARRAY_APPEND

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Returns an array containing all elements from the source array as well as the new element. The new element is located at the end of the array.

Syntax

ARRAY_APPEND( <array> , <new_element> )

Parameters

NameRequiredDescription
arrayrequiredThe source array.
new_elementrequiredThe element to be appended. The type of the element depends on the type of the array: If array is a semi-structured array, the element can be of almost any data type. The data type can be different from the data type(s) of the existing elements in the array. If array is a structured array, the type of the new element must be coercible to the type of the array.

Returns

The data type of the returned value is ARRAY. When you pass a structured array to the function, the function returns a structured array of the same type. If the source array is NULL, the function returns NULL.

See also

Referenced by