Saturday, August 6, 2016

Insert Multiple records at once

CREATE TABLE emplyee
2 (
3 emp_id NUMBER NOT NULL,
4 join_date DATE NOT NULL,
5 email VARCHAR2(100)
6 )



 declare
2 begin
3 for i in 1..100000
4 loop
5 insert into emplyee values (i,'13-APR-2010','xyz'||i);
6 end loop;
7 end;
8 /

PL/SQL procedure successfully completed.

 declare
2 begin
3 for i in 100001..200000
4 loop
5 insert into emplyee values (i,'13-APR-2011','xyz'||i);
6 end loop;
7 end;
8 /


PL/SQL procedure successfully completed.


commit;

Check the count of the table






No comments:

Post a Comment