To reset the value of the identity column in a Microsoft SQL table run the below query:
DBCC CHECKIDENT (TableName, RESEED, 0)
You will need to change TableName to the name of the table you wish to reset.
This query will reset the identity column to 0, meaning the next row will have the identity 1. You can change 0 to whatever identity you wish to start from.
by vipul on Wednesday, September 13th 2006 at 02:48 AM
thanks for this query. i solve my problem help of this query.
i want to information how to use trigger.
by Rajalakshmi.C on Wednesday, August 1st 2007 at 03:36 AM
Server: Msg 2560, Level 16, State 1, Line 1
Parameter 2 is incorrect for this DBCC statement.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
I am using this query. i got this msg... if you know the
the details kindly get back to me...
by mukund on Monday, September 17th 2007 at 05:30 PM
is it possible to change the identity from one column to another in a temp table.. if so please give me the query in sql
by Bill on Thursday, October 23rd 2008 at 08:46 AM