Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Data loading using loop statement

GTS (DBA)Feb 17 2015 — edited Feb 17 2015

Hi ;


For testing purpose i am loading huge data into the database.

i need to create dummy email with id.


I need output following below in email column


1.xx@xxx.com

2.xx@xxx.com

3.xx@xxx.com

    

SQL> begin

  2  for i in 1..50000000 loop

  3  insert into tab1 values(i,'oracle',10000,9999999999,'calcutta','mba','it','male','i.xxx@xxxx.com');

  4  commit;

  5  end loop;

  6  end;

  7  /

begin

*

ERROR at line 1:

ORA-00001: unique constraint (X.CONS4_UNIQ) violated

ORA-06512: at line 3


SQL> select constraint_name, constraint_type, table_name from user_constraints;

CONSTRAINT_NAME                C TABLE_NAME

------------------------------ - ------------------------------

CONS1_NOTNULL                  C TAB1

CONS2_NOTNULL                  C TAB1

CONS3_NOTNULL                  C TAB1

CONS4_UNIQ                     U TAB1

CONS5_PRIM_KEY                 P TAB1

CONS6_UNIQ                     U TAB1

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2015
Added on Feb 17 2015
11 comments
574 views