Skip to content

Determines whether the specified MAP contains the specified key.

MAP_CONTAINS_KEY( <map>, <key> )
ArgumentsDescription
<map>The map to be searched.
<key>The key to find.

Boolean.

SELECT MAP_CONTAINS_KEY({'a':1,'b':2,'c':3}, 'c');
┌────────────────────────────────────────────┐
│ map_contains_key({'a':1,'b':2,'c':3}, 'c') │
├────────────────────────────────────────────┤
│ true │
└────────────────────────────────────────────┘
SELECT MAP_CONTAINS_KEY({'a':1,'b':2,'c':3}, 'x');
┌────────────────────────────────────────────┐
│ map_contains_key({'a':1,'b':2,'c':3}, 'x') │
├────────────────────────────────────────────┤
│ false │
└────────────────────────────────────────────┘