0

Sometime table Identity column value jumps to 60457 from 50489 in SQL Server.

There are some transactions in my project.

I think that this happened due to transactions. I don't know solution of this problem. Please help me. I use Entity Framework in project as ORM.

DhruvJoshi
  • 17,041
  • 6
  • 41
  • 60
  • 1
    ROLLBACK will not revert the identity value to previous stage. – Abdul Rasheed Jun 09 '18 at 07:56
  • What is a problem? It should don't matter what value identity column has. – mentallurg Jun 09 '18 at 07:56
  • 2
    This is a well known behavior since SQL Server **2012** - and there are many well documented ways you can avoid this (if it *really* is a problem). See that duplicate link for starters – marc_s Jun 09 '18 at 08:06
  • (https://stackoverflow.com/questions/282451/sql-identity-autonumber-is-incremented-even-with-a-transaction-rollback?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa) – Sam Jun 09 '18 at 08:11

0 Answers0