declare
i integer;
j integer;
begin
i := 1;
j := 0;
while i < 500000 loop
insert into t_company(id,
name,
address,
telephone,
fax,
contact_name,
position,
contact_phone,
contact_mobile,
email_address,
type,
is_maintenance)
values
(generator.nextval,
to_char(i),
'address',
'2028888',
'202-888',
'contact_name',
'position',
'135399',
'136028',
'123@abc',
'1',
'1');
i := i + 1;
j:= j + 1;
if(j>=2000) then
commit;
j:=0;
end if;
end loop;
commit;
end;
oracle循环插入数据函数
最新推荐文章于 2022-03-30 11:00:53 发布