Skip to main content

MAP_KEYS

Introduced or updated: v1.2.429

Returns the keys in a map.

Syntax

MAP_KEYS( <map> )

Arguments

ArgumentsDescription
<map>The input map.

Return Type

Array.

Examples

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

┌───────────────────────────────┐
│ map_keys({'a':1,'b':2,'c':3})
├───────────────────────────────┤
['a','b','c']
└───────────────────────────────┘
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