标签:oracle i+1 pad rac union int rom integer into
[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
);
标签:oracle i+1 pad rac union int rom integer into
原文地址:http://www.cnblogs.com/gaojian/p/huge_data.html