August 9, 2005 at 7:15 am
Can anyone let me know if there is a easy way to reset the identity back to 1 ? I know if you delete the field and then set it up again but there must be an easier way.
August 9, 2005 at 7:45 am
Not sure if this is the best way to do it..but this works..
select * into #store from {table}
truncate {table}
insert
Mathew J Kulangara
sqladventures.blogspot.com
August 9, 2005 at 11:12 pm
From SQL Server Books Online...
DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value)
Enjoy!
Andrew
August 10, 2005 at 6:12 am
An easy way is:
Set the autonumber (Identity) in off.
save the table
Set the autonumber (Identity) in on.
Save the table.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply