Toad World® Forums

Code Assist with UNION (ALL)

I guess that’s one of the few things you don’t cover yet :slight_smile:

WITH d AS
(
SELECT dummy AS x FROM dual
UNION
SELECT dummy FROM dual
)
SELECT d.|
FROM d;

SELECT d.|
FROM
(
SELECT dummy AS x FROM dual
UNION ALL
SELECT dummy AS y FROM dual – alias ignored
) d;