2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS join;
|
2015-01-30 18:57:44 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE join (s String, x Array(UInt8), k UInt64) ENGINE = Join(ANY, LEFT, k);
|
2015-01-30 18:57:44 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO join VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
|
|
|
INSERT INTO join (k, s) VALUES (3, 'ghi');
|
|
|
|
INSERT INTO join (x, k) VALUES ([3, 4, 5], 4);
|
2015-01-30 18:57:44 +00:00
|
|
|
|
2019-08-29 18:45:34 +00:00
|
|
|
SELECT k, s FROM (SELECT number AS k FROM system.numbers LIMIT 10) js1 ANY LEFT JOIN join USING k;
|
|
|
|
SELECT s, x FROM (SELECT number AS k FROM system.numbers LIMIT 10) js1 ANY LEFT JOIN join USING k;
|
|
|
|
SELECT x, s, k FROM (SELECT number AS k FROM system.numbers LIMIT 10) js1 ANY LEFT JOIN join USING k;
|
|
|
|
SELECT 1, x, 2, s, 3, k, 4 FROM (SELECT number AS k FROM system.numbers LIMIT 10) js1 ANY LEFT JOIN join USING k;
|
2015-01-30 18:57:44 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE join;
|