SQL Server Insert Multiple Rows in a Single Query

Learn how to insert multiple rows in a single SQL Server query and avoid repetitive INSERT statements.

On this page

Let's suppose the next scenario. You have a country table with 2 columns (country_id, name) and you want to insert multiple sets of data. Instead of running multiple queries like:

 INSERT INTO country VALUES (1, 'Canada');
 INSERT INTO country VALUES (2, 'Argentina');
 INSERT INTO country VALUES (3, 'Mexico');
 INSERT INTO country VALUES (4, 'Spain');

You can run a single query that will insert multiple rows at once. The query looks like this:

INSERT INTO Table ( Column1, Column2 ) VALUES
( Value1, Value2 ), ( Value1, Value2 )

Transforming it to my country example:

DbSchema ER diagram designer DbSchema ER diagram designer

Design and visualize
your database schema

Edit referenced records
in related tables

Query your data
visually too

Reuse the SQL
generated

Free Download
INSERT INTO country ( country_id, name ) VALUES
(1, 'Canada'), 
(2, 'Argetina'),
(3, 'Mexico'),
(4, 'Spain');