SQL Server administration and T-SQL development, Web Programming with ASP.NET and Javascript, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software Kodyaz Development Resources
Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Vista, etc.




What is new in SQL Server 2008 aka Katmai
Multiple Inserts using the Insert Into Values enhancement in SQL Server 2008


Multiple Inserts using the Insert Into Values enhancement in SQL Server 2008

It is simple but effective to use the 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







Related SQL Resources

SQL Server Articles

SQL Server 2012

SQL Server Tools

SQL Blog

SQL Server 2008 Blog

Certification Exams Blog

Reporting Services Blog

Analysis Services Blog

MS SQL Server Forums



Free Exam Vouchers









Copyright © 2004 - 2011 Eralper Yilmaz. All rights reserved.
Community Server, by Telligent Systems