Home  • Database • Microsoft SQL Server

To avoid jump identity column number after force restart server

First delete all the rows where number breaks the sequence
declare @id int = 0
SELECT @id =  MAX(id) FROM [IERP_ECOM_HATBAZ].dbo.[accounting_sl_contra_account_type]
--print @id
DBCC CHECKIDENT ('[IERP_ECOM_HATBAZ].dbo.[accounting_sl_contra_account_type]', reseed, @id)

Comments 0


Copyright © 2024. Powered by Intellect Software Ltd