Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Databricks SQL
Databricks Runtime 13.3 LTS and above
Returns array
prepended by elem
.
array_prepend(array, elem)
array
: An ARRAY.elem
: An expression of the same type as the elements ofarray
.
An ARRAY of the same type as array
.
> SELECT array_prepend(array(1, 2, 3), 0);
[0,1,2,3]
> SELECT array_prepend(array(1, 2, 3), NULL);
[NULL,1,2,3]