跳轉到內容

SQL 方言參考/編寫查詢/將選擇查詢結果插入現有表

來自華夏公益教科書,開放的書籍,為開放的世界

將選擇查詢結果插入現有表

[編輯 | 編輯原始碼]

問題:將給定選擇查詢(SELECT columns FROM table ...)的結果插入到結構相同或相容的現有表(existing_table)中。

標準 INSERT INTO existing_table SELECT columns FROM table ...
DB2 INSERT INTO existing_table SELECT columns FROM table ...
Firebird INSERT INTO existing_table SELECT columns FROM table ...
Ingres ?
Linter INSERT INTO existing_table SELECT columns FROM table ...
MonetDB INSERT INTO existing_table SELECT columns FROM table ...
MSSQL INSERT INTO existing_table SELECT columns FROM table ...
MySQL INSERT INTO existing_table SELECT columns FROM table ...
Oracle INSERT INTO existing_table SELECT columns FROM table ...
PostgreSQL INSERT INTO existing_table SELECT columns FROM table ...
SQLite INSERT INTO existing_table SELECT columns FROM table ...
Virtuoso INSERT INTO existing_table SELECT columns FROM table ...
華夏公益教科書