Multiple Inserts using the Insert Into Values on SQL Server
Multiple Inserts using the Insert Into Values is first introduced to database developers with SQL Server 2008. It is simple but effective to use new Insert Into syntax if you use insert multiple records into a table in one process using T-SQL statements.
Here is a sample for you to try the newly introduced enhancement with SQL2008 in T-SQL Insert Into command.
CREATE TABLE MultipleInsertsCities (
CityId int,
CityName nvarchar(25)
)
GO
INSERT INTO MultipleInsertsCities VALUES (1, N'Eskisehir'), (2, N'Istanbul')
SELECT * FROM MultipleInsertsCities
GO
INSERT INTO MultipleInsertsCities (CityId, CityName) VALUES (3, N'New York'), (4, N'Tokyo')
SELECT * FROM MultipleInsertsCities
GO
INSERT INTO MultipleInsertsCities (CityName) VALUES (N'Bangkok'), (N'Lima')
SELECT * FROM MultipleInsertsCities
GO
