Multitable Insert
The multitable INSERT statement is a variation on the INSERT statement syntax we’ve already seen. A multitable INSERT statement repeats the INTO clause of the INSERT statement to insert data into more than one table. Each INTO clause applies to just one table, but by repeating the INTO clause, you can add data to multiple tables. The multitable INSERT must have a subquery to select rows for inserting.
Multitable INSERT statements can accomplish a variety of tasks, including the following:
l Extract data from one table, and insert the data into multiple tables with conditional logic, such as transforming data into a series of archive tables.
l Exchange data between two similar systems of different requirements—perhaps between a transaction-based application and a data warehouse optimized for analysis.
l Support logical archiving at any level of detail with logical decision points embedded in the INSERT statements.
l Integrate complex queries with GROUP BY, HAVING, set operators, and more, all while moving any number of rows dynamically, distributing output into multiple data targets, and programming logical decision points to control data distribution.
l Transform. data that is stored in rows and levels into a cross-tabulation output, the type you would typically see in a spreadsheet application.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25744374/viewspace-749662/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Multitable Insert簡介
- Oracle中的insert/insert all/insert firstOracle
- Oracle 的 INSERT ALL和INSERT FIRSTOracle
- insert /*+ append */ into 與insert into 的區別APP
- INSERT ALL 和INSERT FIRST 的區別
- oracle bulk Insert 比insert 快不是一點啊.Oracle
- SQL__INSERTSQL
- MySQL INSERT DELAYEDMySql
- Search Insert Position
- Oracle Insert BLOBOracle
- E - Insert or Erase
- insert into select
- insert images to a plot
- 直接insert與儲存過程insert效能區別儲存過程
- 關於insert /*+ append*/ 各種insert插入速度比較APP
- SQLite Insert 語句SQLite
- SQLite INSERT OR REPLACE使用SQLite
- MySQL 提高Insert效能MySql
- ODPS insert overwrite/into
- ORACLE insert命令解析Oracle
- mysql insert導致死鎖MySql
- insert()與substr()函式函式
- SQLite 之 INSERT OR REPLACE使用SQLite
- mysql insert的特殊用法MySql
- insert高階語法
- Oracle-insert into加日期Oracle
- 【MySQL】Insert buffer 漫談MySql
- INSERT高階應用
- Bulk Insert命令具體
- insert:key too large to index…Index
- mysql INSERT ... ON DUPLICATE KEY UPDATEMySql
- Leetcode Insert IntervalLeetCode
- 深入SQL之 insert allSQL
- 我渴望的insert操作!
- insert WITH CHECK OPTION的用法
- direct-path [insert] parallelParallel
- Oracle Direct-Path InsertOracle
- ArrayList宣告,Add(), Insert();