Files
doc-exports/docs/dli/sqlreference/dli_08_15093.html
Su, Xiaomeng be9eabe464 dli_sqlreference_20250305
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2025-03-25 09:06:21 +00:00

3.0 KiB

Collection Functions

Description

Table 1 Collection functions

Collection Function

Description

CARDINALITY(array)

Returns the number of elements in the array.

array '[' INT ']'

Returns the element at the INT position in the array. The index starts at 1.

ELEMENT(array)

Returns the unique element in the array (with a base of 1); returns NULL if the array is empty; throws an exception if there are multiple elements in the array.

CARDINALITY(map)

Returns the number of entries in the map.

map '[' value ']'

Returns the value corresponding to the specified key in the map.