Wednesday, August 27, 2008

Procedure to insert millions of record

SQL>create table T(a number,b varchar2(12),c varchar2(9));

SQL>begin
for i in 1..1000000
insert into values
(i,dbms_random.string('U',4),dbms_random.value(1,1000));
if mod(i,10000)=0 then
commit;
end if;
end loop;
end;
/

This procedure is to help you to insert n number of record with random values.

No comments: