Answer the question
In order to leave comments, you need to log in
How to enter several values at once in a table?
There are 500 lines of hash sum files. How can they be brought to the oracle database with one select? Or how can they be imported into a table?
Answer the question
In order to leave comments, you need to log in
one select
INSERT ALL
INTO table_name(col1) VALUES(val1)
INTO table_name(col1) VALUES(val4)
INTO table_name(col1) VALUES(val7)
SELECT * FROM dual;
The most clumsy way to prepare a data file.
1. Open the file in Notepad++.
2. Ctrl+H (Replace).
3. Set the search mode to "Regular Expressions".
4. Find:
^
5. Replace (substitute your own table name):
insert into table\(name\) values \('
6. Click "Replace All".
7. Find:
\r
8. Replace:
'\);
9. Click "Replace All".
As a result, you get 500 rows of inserts. Perform them in one transaction in any way possible.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question