Oracle : Generating Million Random Records for Temporary Table.

Share via:

Step 1 : Create Temporary Table :

CREATE TABLE unpar_table (
a NUMBER, y number,
name VARCHAR2(100), date_used date);

Step 2 :  load table with 1,000,000 rows
begin
for i in 1 .. 1000
loop
for j in 1 .. 1000
loop
insert into unpar_table values ( i, j, dbms_random.random, sysdate-j );
end loop;
end loop;
end;
commit;

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (13 votes, average: 5.00 out of 5)
Loading...

2 thoughts on “Oracle : Generating Million Random Records for Temporary Table.

Add Comment