Insert data to the database (ORACLE) through excel, exceloracle

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.