LorrieL 发表于 2014-12-30 14:22:11

【我分享】一个造百万数据的SQL


create table emp
partition by RANGE(deptno)
( partition PART01 values less than (50000),
partition PART02 values less than (100000),
partition PART03 values less than (300000),
partition PART04 values less than (500000),
partition PART05 values less than (7000000),
partition PARTMAX values less than (MAXVALUE) )
      tablespace Test
      
as select
level as empno,
dbms_random.string('A',30) as ename,
dbms_random.string('B',7) as job,
sysdate - mod(level,100) as hire_date,
dbms_random.value(1,1000) as comm, dbms_random.value(1,10000) as salary,
mod(level,1000000)+1 as deptno
   from dual
   connect by level <= 1000000;
页: [1]
查看完整版本: 【我分享】一个造百万数据的SQL