Saturday, June 11, 2022

Recursive with clause for generating rows

 Sample code to generate rows in oracle using recursive with clause


with ab(cnt) as 

(select 2 as cnt from dual

union all

select cnt+2 from ab where cnt<5

)

select * from ab;

No comments:

Post a Comment