0

Edit: I believe it is not a duplicate since I tried all the solutions given here and here and none of them is working, so it is probably another issue. Also, because in all of the existing questions, the jump is by 1000, but here it is by 2. Also, because it did not happened after restarting SQL Server.


I created an ID column and set it as shown in this image:

enter image description here

But when I try to insert data to the table, the id jumps by 2:

enter image description here

How can I fix it?

Community
  • 1
  • 1
Michael Haddad
  • 4,085
  • 7
  • 42
  • 82
  • I suspect your insert code has a bug (perhaps it is performing two inserts and rolling one back or deleting it). – Aaron Bertrand Feb 28 '16 at 15:49
  • Hey, Aaron. I didn't use any code for the insertion, only the SQL Server Management tools for insertion... – Michael Haddad Feb 28 '16 at 15:57
  • Like `Edit Top 200 Rows`? Stop doing that. I bet the problem goes away if you write proper `INSERT` statements in a query window. (Also, verify that the table doesn't have a trigger.) – Aaron Bertrand Feb 28 '16 at 15:58

0 Answers0