Insert data to the database (ORACLE) through excel, exceloracle
We all know that PL/SQL can copy data to excel, and we can also insert data to the database through excel.
The following is a simple example and example.
First, create a table named test.
Create table test (
Id NUMBER
);
Run the following statement:
SELECT * FROM test for update;
And click the lock
Then we copy a column of numeric data in excel.
Select the column name id in the PL/SQL query results, and press ctrl + v to paste the above data.
Click the Green Arrow
And commit is submitted to complete the task of inserting excel data into the database.
Run selext * from test; to obtain the result, as shown in.
How to import an excel file to an Oracle database
1. First, convert the excel file to csv or txt format, and use the SQL * Loader tool provided by oracle for import.
2. copy the data in the excel file and create a new table structure that is the same as the excel Data in pl/SQL developer. Then, paste it.
3. Use ODBC for import.
How to import data from excel to oracle Database
1. Prepare data: Create required data in excel
2. Save the data in excel as a text file (with tabs separated)
3. Import the data saved to a text file to pl * SQL.
In pl * SQL, select tools -- text importer, select Data from Textfile IN THE displayed window, and then select Open data file,
Select the text file containing data in the pop-up file selection box. The data from textfile displays the data to be imported.
4. Configure the following in configuration:
Note: If you do not check the Name in header, the field Name will also be imported into the database as a record, resulting in data errors.
5. Click data to oracle, select the table to be imported, and associate fields in the text with fields in the Table in fields.
6. Click import to import data.
7. View imported data
OK. Now the data is imported successfully.