Oracleは、完全なマルチテーブルINSERT文の挿入を使用しています

免責事項:この記事はブロガーオリジナル記事ですが、許可ブロガーなく再生してはなりません。https://blog.csdn.net/u012414590/article/details/69372040

文法

フルテーブルの挿入

insert all into table1 values() into table2 values() select * from table

実行後、TABLE1ますテーブルとテーブル2内のすべてのデータが挿入されています

プラスの条件を挿入

insert all when condition1 then into table1 values() when condition2 then into table2 values() select * from table

実行後、データの条件が条件2を満たして表2に挿入され、条件テーブルデータはTABLE1の条件1に挿入され、満足さ

あなたも書くことができます。

insert all when condition1 then into table1 values() else into table2 values() select * from table

構文2

条件の挿入

insert first when condition1 then into table1 values() when condition2 then into table2 values() select * from table

差分:ソーステーブル内の各レコードのメソッドテーブルが複数の条件を満たさ繰り返し挿入しない場合であっても、一度だけ挿入されています

おすすめ

転載: blog.csdn.net/u012414590/article/details/69372040