1. 必须确保dba_objects表有足够数据
select rownum from dba_objects where rownum < br style='font-size:12px;font-style:normal;font-weight:normal;color:rgb(102, 102, 102);' />
2. 递归的with
with data(x) as(
select 1 x from dual
union all
select x+1 from data where x < br style='font-size:12px;font-style:normal;font-weight:normal;color:rgb(102, 102, 102);' />)
select x from data;
3. connect by level写法
select level from dual connect by level < br style='font-size:12px;font-style:normal;font-weight:normal;color:rgb(102, 102, 102);' />
4.xmltable法
select * from xmltable('1 to 10000' columns n int path '.');
select rownum from dba_objects where rownum < br style='font-size:12px;font-style:normal;font-weight:normal;color:rgb(102, 102, 102);' />
2. 递归的with
with data(x) as(
select 1 x from dual
union all
select x+1 from data where x < br style='font-size:12px;font-style:normal;font-weight:normal;color:rgb(102, 102, 102);' />)
select x from data;
3. connect by level写法
select level from dual connect by level < br style='font-size:12px;font-style:normal;font-weight:normal;color:rgb(102, 102, 102);' />
4.xmltable法
select * from xmltable('1 to 10000' columns n int path '.');