array
function
Applies to: Databricks SQL
Databricks Runtime 11.3 LTS and above
Returns an array with the elements in expr
.
Syntax
array(expr [, ...])
Arguments
exprN
: Elements of any type that share a least common type.
Returns
An array of elements of exprNs
least common type.
If the array is empty or all elements are NULL the result type is an array of type null.
Examples
-- 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]
Related
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για