CTE

with tab11(col1,col2) as (
select col1,col1 * 2 from tab1
)
select col1,col2 from tab11;


with tab12(col1) as (
select 1 from dual
union all
select col1+1 from tab12 where col1 < 30
)
select col1 from tab12 order by col1;

 

(8)

with tab11(col1,col2) as (
select col1,col1 * 2 from tab1
)
select col1,col2 from tab11;


with recursive tab12(col1) as (
select 1
union all
select col1+1 from tab12 where col1 < 30
)
select col1 from tab12 order by col1;

 


with tab11(col1,col2) as (
select col1,col1 * 2 from tab1
)
select col1,col2 from tab11;


with recursive tab12(col1) as (
select 1
union all
select col1+1 from tab12 where col1 < 30
)
select col1 from tab12 order by col1;

 


with tab11(col1,col2) as (
select col1,col1 * 2 from tab1
)
select col1,col2 from tab11;


with tab12(col1) as (
select 1
union all
select col1+1 from tab12 where col1 < 30
)
select col1 from tab12 order by col1;