假定表里面已经有一些数据了,现在要通过存储过程来让已有的数据不停的翻番,已造出大量的数据
create or replace procedure insertdata
as
distance int;
begin
distance := 0;
loop
insert into user.table
(empno, ename, job, mgr, hiredate, sal, comm, deptno, test)
select empno, ename, job, mgr, hiredate, sal, comm, deptno, test
from user.table;
exit when distance > 4;
distance := distance + 1;
end loop;
commit;
end;
完了,可以查一下表的大小
select round(sum(bytes)/(1024*1024),2) from user_extents where segment_name = 'user.table';
,