2018-08-28 14:26:12 +00:00
|
|
|
CREATE DATABASE IF NOT EXISTS test;
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS a1;
|
|
|
|
DROP TABLE IF EXISTS a2;
|
2018-08-28 14:26:12 +00:00
|
|
|
|
2018-08-29 16:42:45 +00:00
|
|
|
SET send_logs_level = 'none';
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE a1(a UInt8, b UInt8) ENGINE=Memory;
|
|
|
|
CREATE TABLE a2(a UInt8, b UInt8) ENGINE=Memory;
|
2018-08-28 14:26:12 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO a1 VALUES (1, 1);
|
|
|
|
INSERT INTO a1 VALUES (1, 2);
|
|
|
|
INSERT INTO a1 VALUES (1, 3);
|
|
|
|
INSERT INTO a2 VALUES (1, 2);
|
|
|
|
INSERT INTO a2 VALUES (1, 3);
|
|
|
|
INSERT INTO a2 VALUES (1, 4);
|
2018-08-28 14:26:12 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT a, b FROM a1 LEFT JOIN (SELECT a, b FROM a2) USING a ORDER BY b SETTINGS join_default_strictness='ANY';
|
|
|
|
SELECT a, b FROM a1 LEFT JOIN (SELECT a, b FROM a2) USING a ORDER BY b; -- default SETTINGS join_default_strictness='ALL';
|
2018-08-28 14:26:12 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS a1;
|
|
|
|
DROP TABLE IF EXISTS a2;
|