Hi all,
How to Reset Identity Column value after deleteing record in Sql server.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Arun Kumar TiwariRank #3,157 · 454 reputationPosted Oct 24, 2019, 9:15 PM EDT
The DBCC CHECKIDENT management command is used to reset identity counter. The command syntax is:
DBCC CHECKIDENT (table_name [, { NORESEED | { RESEED [, new_reseed_value ]}}])
[ WITH NO_INFOMSGS ]
DBCC CHECKIDENT ('tablename', RESEED, 0); GO ThanksSujay AnandRank #1,857 · 800 reputationPosted Oct 29, 2019, 10:42 PM EDT
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 7, 2019, 7:02 PM EST