Way One: (not formally)
The number of columns in the select is the same as the number of columns in the prepared excle.
Select Xh,name from table name where xh = ' ghf ' for update; (No results or one or two rows of results found)
In Excel is
XH Name
123 Alan
Add a column of empty columns to excel (required)
Copy
Open the table structure (open that lock)
Paste it in.
Click on the tick, close the lock, submit.
I usually use this method, fast.
Way two:
Convert Excel to TXT file, and then use the PL/SQL tool to import
1. In excle, organize the data into a format similar to the Oracle table, and note that formatting cells is text (tab delimited)
2. Save Excle as a text file (Tab delimited) (*.txt)
3. Open PL/SQL, connect to the library that you want to import, and then click Tools--Text importer in the toolbar (Chinese: Tools--File import)
4. After opening, click the Import File button
5. Select the file you just saved as, open
6. After opening, you can see that the data has been displayed, and then according to the data in the Excel table to see if there is a table header, if so, tick the corresponding button
7. Switch tab, and then in the input table name, as well as the field, if the table has been created, directly select the corresponding table of the field can be
8. Import the file, if no input table, no, need to create a new table, and then import again
9. Import completed, query data
Way three:
Convert Excel to a CSV file, and then import it using the command window
1. Open the Excel table you want to import, click the Office Button, choose Save As--other format
Select Save path (put in d:\), save type CSV (comma delimited) (*.csv), set file name to Student.csv, click Save
2. Create a new Input.ctl file (placed in d:\) with the content:
Load data
InFile ' D:\student.csv '
Append into table student-terminated by ', '
Trailing Nullcols (id,name,sex,age)
Description
InFile The following parameter is the path and name of the Excel table (converted to CSV format) to import; append is appended to the table;
Table name in the Oracle database, terminated by ', ' represents the field delimiter, (Id,name,sex,age) represents the field name list
3. Press the Windows logo key and R key at the same time, open run, enter cmd, open command prompt, enter command:
Sqlldr Userid=system/[email protected] Control=d:\input.ctl
Description: System/test, the owner of the Oracle database table student and its password;
@netservicename the name of the network service;
Control is the Input.ctl file name and path
4. Enter Oracle database, query student table, Excel imported successfully
Note: The contents of the essay are from the online data collation, for reference only.
How the data inside the excle is imported into the Oracle database