Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 364 Bytes

File metadata and controls

18 lines (15 loc) · 364 Bytes

#snowflake

❓Operators : and subsequent . and [] always return VARIANT values containing strings.

select
    PARSE_JSON(' { "key1": "value1", "key2": "value2" } ') as a
    , a:key1 as b
    , typeof(b)
|   |   |   |
|---|---|---|
|A|B|TYPEOF(B)|
|{ "key1": "value1", "key2": "value2" }|"value1"|VARCHAR|

why is type of b VARCHAR?