2020-01-18 02:47:55 +00:00
|
|
|
SELECT id
|
|
|
|
FROM
|
|
|
|
(
|
|
|
|
SELECT 1 AS id
|
|
|
|
UNION ALL
|
|
|
|
SELECT NULL
|
|
|
|
UNION ALL
|
|
|
|
SELECT NULL
|
2020-02-26 13:11:06 +00:00
|
|
|
) js1
|
2020-01-18 02:47:55 +00:00
|
|
|
ALL FULL OUTER JOIN
|
|
|
|
(
|
|
|
|
SELECT 1 AS id
|
|
|
|
UNION ALL
|
|
|
|
SELECT NULL
|
|
|
|
UNION ALL
|
|
|
|
SELECT NULL
|
2020-02-26 13:11:06 +00:00
|
|
|
) js2 USING (id)
|
2020-01-18 02:47:55 +00:00
|
|
|
ORDER BY id;
|
|
|
|
|
|
|
|
SELECT '---';
|
|
|
|
|
|
|
|
SELECT *
|
|
|
|
FROM
|
|
|
|
(
|
|
|
|
SELECT NULL AS x
|
2020-02-26 13:11:06 +00:00
|
|
|
) js1
|
2020-01-18 02:47:55 +00:00
|
|
|
INNER JOIN
|
|
|
|
(
|
|
|
|
SELECT NULL AS x
|
2020-02-26 13:11:06 +00:00
|
|
|
) js2 USING (x);
|
2020-01-18 02:47:55 +00:00
|
|
|
|
|
|
|
SELECT '---';
|
|
|
|
|
|
|
|
SELECT *
|
|
|
|
FROM
|
|
|
|
(
|
|
|
|
SELECT NULL AS x
|
2020-02-26 13:11:06 +00:00
|
|
|
) js1
|
2020-01-18 02:47:55 +00:00
|
|
|
FULL OUTER JOIN
|
|
|
|
(
|
|
|
|
SELECT NULL AS x
|
2020-02-26 13:11:06 +00:00
|
|
|
) js2 USING (x);
|