Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
APPLIES TO:
NoSQL
Returns the number of elements in the specified array expression.
ARRAY_LENGTH(<array_expr>)
Description | |
---|---|
array_expr |
An array expression. |
Returns a numeric expression.
The following example illustrates how to get the length of an array using the function.
SELECT VALUE {
length: ARRAY_LENGTH([70, 86, 92, 99, 85, 90, 82]),
emptyLength: ARRAY_LENGTH([]),
nullLength: ARRAY_LENGTH(null)
}
[
{
"length": 7,
"emptyLength": 0
}
]
- This system function doesn't use the index.