Aug 1, 2016

Update a Auto Increment Column in SQL Server



set identity_insert [WorkFlow].[WorkFlowMaster] on

INSERT INTO [WorkFlow].[WorkFlowMaster]
           (
      [WorkFlowID]
     ,[WorkFlowCategoryID]
           ,[Name]
           ,[ShortName]
           ,[StepNumber]
           ,[IsFinalStep]
           ,[DocumentsRequired])
     VALUES
           (
      7
     ,2
           ,'Decision Received'
           ,'DecisionRcvd'
           ,6
           ,0
           ,0
     )
GO

delete [WorkFlow].[WorkFlowMaster] where [WorkFlowID] = 11;

set identity_insert [WorkFlow].[WorkFlowMaster] off