[Oracle]快速構造大量數據的方法:
create table tab001(id integer primary key, val varchar2(100));
insert into tab001
?select i+j,rpad(to_char(i+j),100,'A')
?? from? (
????????? with DATA2(j) as (
??????????????????????????? select 0 j from DUAL
????????????????????????????? union all
??????????????????????????? select j+1000 from DATA2 where j < 999000
?????????????????????????? )
????????? select j from DATA2
???????? ),
???????? (
????????? with DATA1(i) as (
??????????????????????????? select 1 i from DUAL
????????????????????????????? union all
??????????????????????????? select i+1 from DATA1 where i < 1000
?????????????????????????? )
????????? select i from DATA1
???????? );