2020-02-05 13:51:41 +00:00
|
|
|
DROP TABLE IF EXISTS test_joinGet;
|
2020-07-23 07:47:17 +00:00
|
|
|
DROP TABLE IF EXISTS test_join_joinGet;
|
2020-02-05 13:51:41 +00:00
|
|
|
|
2020-07-23 07:47:17 +00:00
|
|
|
CREATE TABLE test_joinGet(id Int32, user_id Nullable(Int32)) Engine = Memory();
|
|
|
|
CREATE TABLE test_join_joinGet(user_id Int32, name String) Engine = Join(ANY, LEFT, user_id);
|
2020-02-05 13:51:41 +00:00
|
|
|
|
2020-07-23 07:47:17 +00:00
|
|
|
INSERT INTO test_join_joinGet VALUES (2, 'a'), (6, 'b'), (10, 'c');
|
2020-02-05 13:51:41 +00:00
|
|
|
|
2020-07-23 07:47:17 +00:00
|
|
|
SELECT 2 id, toNullable(toInt32(2)) user_id WHERE joinGet(test_join_joinGet, 'name', user_id) != '';
|
2020-02-05 13:51:41 +00:00
|
|
|
|
|
|
|
DROP TABLE test_joinGet;
|
2020-07-23 07:47:17 +00:00
|
|
|
DROP TABLE test_join_joinGet;
|