ClickHouse/dbms/tests/queries/0_stateless/00549_join_use_nulls.sql

31 lines
478 B
MySQL
Raw Normal View History

2017-12-25 00:38:45 +00:00
SET join_use_nulls = 1;
DROP TABLE IF EXISTS null;
CREATE TABLE null (k UInt64, a String, b Nullable(String)) ENGINE = Log;
2017-12-25 00:38:45 +00:00
INSERT INTO null 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
)
ANY LEFT JOIN
(
SELECT
number AS k,
toString(number) AS b
FROM system.numbers
LIMIT 1, 2
) USING (k)
ORDER BY k ASC;
SELECT * FROM null ORDER BY k, a, b;
2017-12-25 00:38:45 +00:00
DROP TABLE null;