The INSERT INTO statement is used to insert new records in a table.

1. Insert multiple values

INSERT INTO statement has two ways:

  1. Specify both the column names and the values to be inserted:
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);
  1. add values for all columns of the table, but make sure in the same order as the table. For this purpose, no columns needed to be provided
INSERT INTO table_name
VALUES (value1, value2, value3, ...);

2. Insert Multiple Rows

To insert multiple rows of data, we use the same INSERT INTO statement, but with multiple values:

INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES
('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway'),
('Greasy Burger', 'Per Olsen', 'Gateveien 15', 'Sandnes', '4306', 'Norway'),
('Tasty Tee', 'Finn Egan', 'Streetroad 19B', 'Liverpool', 'L1 0AA', 'UK');

seperate each rows with a comma “ , ”.