declare
maxnumber constant number:=10000;
i number :=1;
begin
for i in 1..maxnumber loop
insert into DEPT(DEPTID,DEPTNAME,FATHERID)
values(i,CONCAT(‘test‘,i),i-1); --CONCAT(‘test‘,i)是将test与i进行拼接
end loop;
dbms_output.put_line(‘ 成功录入数据! ‘);
commit;
end;
时间: 2024-12-28 15:23:54