Home » SQL & PL/SQL » SQL & PL/SQL » inserting more than 30000 records into a table (Oracle 10g)
inserting more than 30000 records into a table [message #570813] Fri, 16 November 2012 01:40 Go to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
How to insert more than 30000 records in a table using oracle procedure
where I am having a table with number,varchar,data fields and columns like empno,ename,sal,date of joining,data of leaving.

Data should populate using procedure.is there any way of doing it by procedure
Re: inserting more than 30000 records into a table [message #570814 is a reply to message #570813] Fri, 16 November 2012 01:41 Go to previous messageGo to next message
Littlefoot
Messages: 19689
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I believe so, but there might be better ways.

What is the source?

[Updated on: Fri, 16 November 2012 01:41]

Report message to a moderator

Re: inserting more than 30000 records into a table [message #570816 is a reply to message #570813] Fri, 16 November 2012 01:52 Go to previous messageGo to next message
Michel Cadot
Messages: 59419
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Of course you can do it in a PL/SQL but you can (most liekly) also do it in a single SQL statement which is far better.

Regards
Michel
Re: inserting more than 30000 records into a table [message #570818 is a reply to message #570816] Fri, 16 November 2012 02:01 Go to previous messageGo to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
can you provide sql query if it so,using DBMS_RANDOM.STRING values are coming in a different way.
Re: inserting more than 30000 records into a table [message #570819 is a reply to message #570818] Fri, 16 November 2012 02:08 Go to previous messageGo to next message
Michel Cadot
Messages: 59419
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
insert into mytable (value) 
select DBMS_RANDOM.STRING('A',10) from dual connect by level <= 30000+1;

Regards
Michel
Re: inserting more than 30000 records into a table [message #570820 is a reply to message #570819] Fri, 16 November 2012 02:12 Go to previous messageGo to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
Thanks could you suggest for data and number fields too.
Re: inserting more than 30000 records into a table [message #570821 is a reply to message #570820] Fri, 16 November 2012 02:35 Go to previous message
Michel Cadot
Messages: 59419
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
DBMS_RANDOM

Regards
Michel
Previous Topic: Need Sql Query
Next Topic: explose rows
Goto Forum:
  


Current Time: Wed Oct 22 11:44:46 CDT 2014

Total time taken to generate the page: 0.12196 seconds