Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Loop to fill db with dummy data
inserted 1000 when I ran it.
How do you figure it would only do 500?
SQL>create table performance (id number, other_col varchar2(20));
Table created.
Elapsed: 00:00:00.01
SQL>DECLARE
2 x NUMBER := 0;
3 BEGIN
4 FOR i IN 1..1000 LOOP
5 INSERT INTO performance values(x,'x');
6 x := x+1;
7 END LOOP;
8 END;
9 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:01.52
SQL>select count(*) from performance;
COUNT(*)
1000
1 row selected.
Knut Talman wrote:
>
> > DECLARE
> > x NUMBER := 0;
> > BEGIN
> > FOR i IN 1..1000 LOOP
> > INSERT INTO performance values(x,'x');
> > x := x+1;
>
> That'll only insert 500 records.
>
> > END LOOP;
> > END;
> > /
>
> Regards,
>
> Knut
Received on Mon Apr 08 2002 - 13:16:14 CDT
![]() |
![]() |