Skip to main content

MAP_SIZE

Introduced or updated: v1.2.459

Returns the size of a MAP.

Syntax​

MAP_SIZE( <map> )

Arguments​

ArgumentsDescription
<map>The input map.

Return Type​

UInt64.

Examples​

SELECT MAP_SIZE({'a':1,'b':2,'c':3});

┌───────────────────────────────┐
│ map_size({'a':1,'b':2,'c':3}) │
├───────────────────────────────┤
│ 3 │
└───────────────────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today