Get started
Load & manage data
Work with data
Administration
Reference & resources
Updated Oct 02, 2023
Send us feedback
array
Applies to: Databricks SQL Databricks Runtime 10.5 and above
Returns an array with the elements in expr.
expr
array(expr [, ...])
exprN: Elements of any type that share a least common type.
exprN
An array of elements of exprNs least common type.
exprNs
If the array is empty or all elements are NULL the result type is an array of type null.
-- an array of integers > SELECT array(1, 2, 3); [1,2,3] -- an array of strings > SELECT array(1.0, 1, 'hello'); [1.0,1,hello]
[ ] operator
map function
collect_set aggregate function
collect_list aggregate function
SQL data type rules