• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1718
  • Last Modified:

How can you Insert Multiple Records at once with Oracle SQL Plus

I'm a novice studying sql plus at uni.

I know how to insert records one at a time with
Insert into TABLENAME
 values ('bla' 'bla' 'bla');

..BUT how do you insert multiple records at once???
0
keznwichi
Asked:
keznwichi
  • 2
2 Solutions
 
catchmeifuwantCommented:
If you are inserting multiple records from a source table then

insert into table1(col1,col2,col3)
select col1,col2,col3
from table2;

0
 
catchmeifuwantCommented:
But with this, you have to do it one-by-one :

Insert into TABLENAME
values ('bla' 'bla' 'bla');

Insert into TABLENAME
values ('bla1' 'bla1' 'bla1');

commit;
0
 
keznwichiAuthor Commented:
I'm not inserting from a source table unfortunately.

Does that really mean i have to insert each record insert one by one?
0
 
slightwv (䄆 Netminder) Commented:
Sounds like a good candidate for SQL*Loader.....

This will read from a flat text file and insert into a table.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now