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

  1. Very Good information, the information which you have provided is very good and necessary for everyone. Always keep sharing this kind of information. Thank you. IT support Miami

    ReplyDelete

Post a comment

Popular posts from this blog

Parse XML to dynamic object in C#

C# Crop white space from around the image