I have one column in my Order table and that is auto increment.
Now I want to reset it means it should start from 1000 and next value will be 1001. How can I do.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pankaj Kumar ChoudharyPosted Sep 26, 2015, 1:04 PM
Reseed the identity Column:
We can also reseed the identity field value. By doing so identity field values will start with a new defined value. This method checks the current identity value for the specified table in SQL Server and, if it is needed, changes the identity value. We use DBCC CHECKIDENT method to manually set a new identity value for the identity column.
/*SET NEW VALUE TO IDENTITY COLUMN*/
DBCC checkident (table_name, RESEED,1000)
Supreeth JPosted Sep 28, 2015, 12:32 AM
Sujeet SumanPosted Sep 27, 2015, 9:13 AM
Raja TPosted Sep 26, 2015, 10:17 PM
DBCC CHECKIDENT ('your table name', RESEED, 1000);
Above query execute staring I'd 1001 automatically reset....
Manas MohapatraPosted Sep 26, 2015, 12:31 PM