HOW TO: Reset the Identity value of a table

Following on from my last post about Identity values on tables, this post will cover what to do when an Identity value is out of step with what it *should be*.

ALTER TABLE id_testing ALTER COLUMN id SET IDENTITY(X);

It’s a simple ALTER TABLE command, replace X with your current MAX(id) value.

Leave a Reply

Your email address will not be published. Required fields are marked *