DECLARE
i number := 0;
BEGIN
for i in 1 .. 3000 loop
insert into computers
(comNo, compModel, buyTime, price, owner)
values
(i, '8' + i, to_date('' + sysdate, 'YYYY-MM'), i, 'zhangsan');
--dbms_output.put_line(i);
end loop;
commit;
declare
i number := 1;
begin
loop
insert into people (sname, sex, birthday)values('beian',2,to_date('2018-9-02','yyyy-mm-dd'));
i := i +1;
exit when i>30;
end loop;
commit;
dbms_output.put_line(i);
end;
原文:https://blog.csdn.net/luozhonghua2014/article/details/46489569