Search notes:

SQL: INSERT statement

The purpose of the insert statement is to add data (that is: create new records) to a table.

Insert a single record into a table

INSERT INTO target_table                VALUES (1, 'one');
INSERT INTO target_table (col_1, col_2) VALUES (2, 'two');

Insert multiple records in one go

The individual records to be inserted can be separated with commas:
INSERT INTO target_table VALUES
('record'    , 'one'   ),
('another'   , 'record'),
 …;
Note, that this variant does not work with Oracle SQL (18c).

Insert the result of a query

The result of a select statement can be inserted into a table:
INSERT INTO target_table
  SELECT …
  FROM   …
;

See also

A trigger allows to specify a sequence of actions to be executed when one or more records are inserted into a table.
DML statements

Index