Skip to main content

ARRAY_LENGTH

Returns the length of an array.

Syntax

ARRAY_LENGTH( <array> )

Aliases

Examples

SELECT 
ARRAY_LENGTH(['apple', 'banana', 'cherry']) AS item_count,
ARRAY_SIZE(['apple', 'banana', 'cherry']) AS item_count_alias;

┌───────────────────────────────┐
│ item_count │ item_count_alias │
├────────────┼──────────────────┤
33
└───────────────────────────────┘
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today