How to insert 1 million random row into table database Oracle

Viewed 38858

I can not figure out how to put a huge amount of data in the table. The data must not repeat

Advise, may have other ways?

create table COUNTRIES (
  COUNTRY_ID   VARCHAR2(7),
  COUNTRY_NAME VARCHAR2(40),
  constraint COUNTRY_C_ID_PK primary key (COUNTRY_ID)
);


Begin
For IDS in 1..1000000
Loop
INSERT INTO "SYSTEM"."COUNTRIES" (COUNTRY_ID, COUNTRY_NAME) VALUES (dbms_random.string('L', 7), dbms_random.string('L', 15));
Commit;
End loop;
End; 
2 Answers
Related