Use this tag for questions about inserting multiple rows in a single statement into an SQL database.
Multiple row inserts are a feature of many SQL databases. They're a feature of the SQL-92 standard.
The most common syntax for multiple row inserts is similar to a normal INSERT INTO
statement, but with multiple value groups separated by comma's
INSERT INTO MyTable(Value1, Value2)
VALUES
('Value1Row1', 'Value2Row1'),
('Value1Row2', 'Value2Row2'),
('Value1Row3', 'Value2Row3')
Alternatively, multiple row inserts can be achieved by using an INSERT INTO ... SELECT
statement and UNION
queries in many RDBMS.
For more information, see Wikipedia on multi-row inserts.