I have a script which has around 2600 insert statements on a single table. Like below
insert into STUDENT(NAME, ROLL) VALUES('Bob', 1);
insert into STUDENT(NAME, ROLL) VALUES('Ron', 2);
.
.
insert into STUDENT(NAME, ROLL) VALUES('Jack', 2600);
I am running this script (Oracle DB) by pressing F9
and it starts executing line by line and takes lot of time.
Is there a way I can execute them all at once?
NOTE: The insert script is generated through export and I cannot change it in the below format
insert into STUDENT
VALUES
('Bob', 1),
('Ron', 2),
.
.
('Jack', 2600);
Script contains separate INSERT INTO
statements and they are executed as such - separately, one-by-one.
If you exported data into an e.g. CSV file, you could have
to do it much faster. But, as you didn't, let the script run and wait a while. I don't think that you have any other option (unless you separate it into several smaller files and run them in separate SQL*Plus connections in parallel, but that would probably take more time to prepare than wait for current script to finish).
As of SQL*Loader:
This is Oracle 11g SQL*Loader documentation. It takes time to read it but - regarding the fact that it is a simple two-column table, should be fairly simple to do it.