这个查询生成从1到4的数字。
with recursive z(q) as (
select 1
union all
select q + 1 from z where q < 4
)
select * from z;
但是,如果我将它修改为这样:
with x as (
select 1 y
),
recursive z(q) as (
select y from x
union all
select q + 1 from z where q < 4
)
select * from z;
它给出了:
错误:语法错误,附近的“z”
我在这里做错了什么?