您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Oracle利用存储过程造数据

2024/3/16 5:20:18发布20次查看
假定表里面已经有一些数据了,现在要通过存储过程来让已有的数据不停的翻番,已造出大量的数据 create or replace proced
假定表里面已经有一些数据了,现在要通过存储过程来让已有的数据不停的翻番,已造出大量的数据
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';

该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product