ClickHouse/tests/queries/0_stateless/01915_json_extract_raw_string.sql
2021-10-20 17:57:14 +08:00

10 lines
362 B
SQL

-- Tags: no-fasttest
select JSONExtract('{"a": "123", "b": 456, "c": [7, 8, 9]}', 'Tuple(a String, b String, c String)');
with '{"string_value":null}' as json select JSONExtract(json, 'string_value', 'Nullable(String)');
select JSONExtractString('{"a": 123}', 'a');
select JSONExtractString('{"a": "123"}', 'a');
select JSONExtractString('{"a": null}', 'a');