Semi-structured and structured data functions (Array/Object)
Returns an array constructed from zero, one, or more inputs; the constructed array omits any NULL input values.
ARRAY_CONSTRUCT_COMPACT( [ <expr1> ] [ , <expr2> [ , ... ] ] )
Copy
Arguments¶expr#
These are the input expressions to evaluate; the resulting values are put into the array. The expressions do not all need to evaluate to the same data type.
The data type of the returned value is ARRAY
.
SQL NULL values are skipped when building the result array, resulting in a compacted (i.e. dense) array.
Construct a basic dense array consisting of different data types:
SELECT ARRAY_CONSTRUCT_COMPACT(null,'hello',3::double,4,5); +-----------------------------------------------------+ | ARRAY_CONSTRUCT_COMPACT(NULL,'HELLO',3::DOUBLE,4,5) | |-----------------------------------------------------| | [ | | "hello", | | 3.000000000000000e+00, | | 4, | | 5 | | ] | +-----------------------------------------------------+
Copy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4