2017-12-25 00:38:45 +00:00
|
|
|
SET join_use_nulls = 1;
|
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
DROP TABLE IF EXISTS null_00549;
|
|
|
|
CREATE TABLE null_00549 (k UInt64, a String, b Nullable(String)) ENGINE = Log;
|
2017-12-25 00:38:45 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
INSERT INTO null_00549 SELECT
|
2017-12-25 00:38:45 +00:00
|
|
|
k,
|
|
|
|
a,
|
|
|
|
b
|
|
|
|
FROM
|
|
|
|
(
|
|
|
|
SELECT
|
|
|
|
number AS k,
|
|
|
|
toString(number) AS a
|
|
|
|
FROM system.numbers
|
|
|
|
LIMIT 2
|
2019-08-29 18:45:34 +00:00
|
|
|
) js1
|
2017-12-25 00:38:45 +00:00
|
|
|
ANY LEFT JOIN
|
|
|
|
(
|
|
|
|
SELECT
|
|
|
|
number AS k,
|
|
|
|
toString(number) AS b
|
|
|
|
FROM system.numbers
|
|
|
|
LIMIT 1, 2
|
2019-08-29 18:45:34 +00:00
|
|
|
) js2 USING (k)
|
2017-12-25 00:38:45 +00:00
|
|
|
ORDER BY k ASC;
|
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
SELECT * FROM null_00549 ORDER BY k, a, b;
|
2017-12-25 00:38:45 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
DROP TABLE null_00549;
|