ARRAY_PREPEND
Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Inserts a value at the start of an array.
<value>: The value to insert at the start of the array. The value must match the array element type.<array>: The array to prepend to.
Returns an array with the new value inserted at the beginning.
- Prepending NULL changes the array element type to nullable.
Add a value to the front of an array.
Returns array[1, 2, 3, 4], with 1 inserted at the beginning.
Add a NULL value to the front of an array.
Returns array[null, 2, 3, 4]. Prepending NULL to an array with a non-nullable element type changes the resulting element type to nullable.