-
Notifications
You must be signed in to change notification settings - Fork 440
Arrays and Maps
Toni Müller edited this page Sep 26, 2022
·
6 revisions
Some SQL dialects have special syntax for creating and manipulating Array and Map types.
Array literals [1, "two", 3]. Supported by:
Array literals ARRAY[1, 2, 3]. Supported by:
Map literals in JSON style {"foo": 1, "bar": "John"}. Supported by:
- N1QL.
Array and Map access using square brackets like arr[1] and map['key'].
Supported by:
Array subscript operator arr[OFFSET(5)]. Supported by:
Notes:
- Snowflake also supports a dot syntax to access the values of keys. The first key has to be extracted with
:after that,.can be used to access deeper nested values.