SQL Reseed Identity

Posted by Joe Enos on January 05, 2021 · 1 min read

If you need to manually insert a value into an identity column, but you don't want to interrupt the current identity sequence, you can reseed the value.

If you go with a positive value, make sure you pick something higher than you'll ever hit, to avoid an ID collision.

Or you can pick a negative number instead. This also gives you the advantage of picking a smaller meaningful number, and easy recognition that this ID is special. Also, if you go negative, you don't need to even both with reseeding the identity.

View Code on GitHub