ClickHouse/tests/queries/0_stateless/00661_array_has_silviucpp.sql

10 lines
323 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS has_function;
2018-07-06 19:22:12 +00:00
CREATE TABLE has_function(arr Array(Nullable(String))) ENGINE = Memory;
INSERT INTO has_function(arr) values ([null, 'str1', 'str2']),(['str1', 'str2']), ([]), ([]);
2018-07-06 19:22:12 +00:00
SELECT arr, has(`arr`, 'str1') FROM has_function;
2018-07-06 19:22:12 +00:00
SELECT has([null, 'str1', 'str2'], 'str1');
DROP TABLE has_function;