Monday, 2 February 2009

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

No comments:

Post a Comment