SQL Dialects Reference/Write queries/Insert results from select query into existing table

From Wikibooks, open books for an open world
< SQL Dialects Reference
Jump to: navigation, search

Insert results from select query into existing table[edit]

Problem: Insert results from a given select query (SELECT columns FROM table ...) into existing table (existing_table) of the same or compatible structure (as query result).

Standard 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  ?
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 ...