SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for ASP.Net, SQL Server, Reporting Services, T-SQL, Windows, AWS, SAP HANA and ABAP


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
Code


SQL Server

SQL Server 2019 Installation
download SQL Server 2019
download SQL Server 2017
download SQL Server 2016
download SQL Server 2014
download SQL Server 2012
MacOS ve SQL Server 2019


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.