--1. by japan
select level n from dual connect by level <=10;
--2. by tomkyte
select rownum n from all_objects where rownum<=10;
--3.
select to_number(column_value) n from xmltable('1 to 10');
--4. model
select n
from (select 1 v from dual)
model
dimension by (v)
measures (v n)
rules
(
n[for v from 2 to 10 increment 1] = n[cv(v)-1] + 1
);
--5. recursive with
with t(n) as
(
select 1 from dual
union all
select n + 1 from t where n < 10
)
select n from t
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24383181/viewspace-750561/
,如需转载,请注明出处,否则将追究法律责任。