Disable identity insert in SQL Server

SET IDENTITY_INSERT dbo.table_name OFF
INSERT INTO table_name( [Id] , [Name])
SELECT 1 , 'Name1'
SET IDENTITY_INSERT dbo.table_name ON
GO

Comments

Popular posts from this blog

Parse XML to dynamic object in C#

C# Crop white space from around the image