Reputation: 71
How I can write a query like that:
with t1 as
(
select id
from table1
),
RECURSIVE t2(
select * from t2
union
...
)
Currently it's not allowed?
Upvotes: 7
Views: 2220
Reputation:
The recursive
needs to be right after the WITH
regardless on where you put the recursive CTE:
with recursive t1 as
(
select id
from table1
), t2 (
select *
from t2
union
...
)
...
Upvotes: 12