How is this:
WITH t AS (
SELECT
'a' AS col_a,
'b' AS col_b
)
SELECT
col_a -- missing comma passes validation
col_b
FROM t
Results into this:
╔═══════╗
║ col_b ║
╠═══════╣
║ a ║
╚═══════╝
Is this a bug or a feature?
CodePudding user response:
Not a bug, your main query means
SELECT col_a AS col_b FROM t;
col_a comes from table t
and col_b is it's alias.