Skip to main content

MAP_DELETE

Introduced or updated: v1.2.547

Returns an existing MAP with one or more keys removed.

Syntax

MAP_DELETE( <map>, <key1> [, <key2>, ... ] )

Arguments

ArgumentsDescription
<map>The MAP that contains the KEY to remove.
<keyN>The KEY to be omitted from the returned MAP.
note
  • The types of the key expressions and the keys in the map must be the same.
  • Key values not found in the map will be ignored.

Return Type

Map.

Examples

SELECT MAP_DELETE({'a':1,'b':2,'c':3}, 'a', 'c');
┌───────────────────────────────────────────┐
│ map_delete({'a':1,'b':2,'c':3}, 'a', 'c')
├───────────────────────────────────────────┤
│ {'b':2} │
└───────────────────────────────────────────┘
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today