Skip to main content

INSERT

Insert new rows matching the table schema.

Overview​

INSERT INTO table_name [ ( column [, ... ] ) ] query

Parameters​

[ ( column [, ... ] ) ]​
  • If column names are specified, they must exactly match the columns generated by the query.
  • If the column list is not specified, the columns generated by the query must exactly match the columns of the table to insert into.

Example​

insert statement example
INSERT INTO orders
SELECT * FROM new_orders;

INSERT INTO nation (nationkey, name, regionkey)
VALUES (26, 'POLAND', 3);

INSERT INTO cities
VALUES (2, 'San Jose'), (3, 'Oakland');