Oracle Database multi-Table insertion

Source: Internet
Author: User
Oracle inserts multiple tables. Most insert operations are for a single table. However, oracle supports insert statements for multiple tables. Data Warehouse Extraction

Oracle inserts multiple tables. Most insert operations are for a single table. However, oracle supports insert statements for multiple tables. Data Warehouse Extraction

Oracle inserts multiple tables.

Most insert operations are for a single table. However, oracle supports insert statements for multiple tables. In terms of data warehouse extraction, transfer and loading (ETL, Extract Transform and Load) routines, you will frequently use multi-table insert operations.

With a multi-table insert, you can load data into multiple data tables through a single data source. By reducing the path of the entire data, we can reduce the workload and output data faster.

If a WHEN condition is TRUE, the related INTO statement is executed. If no conditions are true and true, the ELSE clause is executed. Keyword ALL tells the database to check

Each condition. On the other hand, the keyword FIRST tells the database to stop checking the subsequent conditions WHEN the FIRST condition of the check WHEN condition is true.

In the following example, an insurance company has two insurance clauses. Property and accidental injury are included in the clause. In the data market, they split the two tables into separate fact tables. During monthly loading, the new terms are added to the property_premium_fact and cacuaty_premium_fact tables. You can use multi-table insert to Add rows more effectively.

INSERT statements are more efficient. Example:

Multiple table inserts and INSERT statements are used to replace two separate INSERT statements. Such code blocks

Using a single table access channel instead of two access channels, data loading is more efficient.

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.