mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 05:52:05 +00:00
30 lines
342 B
MySQL
30 lines
342 B
MySQL
|
SELECT
|
||
|
1 AS value,
|
||
|
*
|
||
|
FROM
|
||
|
(
|
||
|
SELECT 1 AS key
|
||
|
) AS l
|
||
|
LEFT JOIN
|
||
|
(
|
||
|
SELECT
|
||
|
2 AS key,
|
||
|
1 AS value
|
||
|
) AS r USING (key)
|
||
|
SETTINGS join_use_nulls = 1;
|
||
|
|
||
|
SELECT
|
||
|
1 AS value,
|
||
|
*
|
||
|
FROM
|
||
|
(
|
||
|
SELECT 2 AS key
|
||
|
) AS l
|
||
|
LEFT JOIN
|
||
|
(
|
||
|
SELECT
|
||
|
2 AS key,
|
||
|
1 AS value
|
||
|
) AS r USING (key)
|
||
|
SETTINGS join_use_nulls = 1
|