Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Reset an Identity Field on Existing Data
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

228 Posts

Posted - 02/07/2013 :  12:49:52  Show Profile  Reply with Quote
I have a table that I have pulled in from an Access database that was corrupted and it kept allowing an auto number to repeat itself. The number is not used as a primary key, but it does need to remain unique. I want to just reset the reseed the whole field in the table, but I can't seem to find out how to do it with existing data only with new data.

I have tried


It does nothing for me.

Any ideas? Is this even possible?

Thank you.

Flowing Fount of Yak Knowledge

4614 Posts

Posted - 02/07/2013 :  12:54:37  Show Profile  Reply with Quote
Reseeding the table is not going to update the Identity values, if that's what you are tryign to do. Depending on what you are trying to do, it might be easy to drop the existing column and add a new one that is an IDENTITY. If that won't work for you then I'd suggest you follow the link below and provide sample date and expected output:
Go to Top of Page

Posting Yak Master

228 Posts

Posted - 02/07/2013 :  13:05:12  Show Profile  Reply with Quote
I can just drop the identity field and create a new one that is what I always do to fix it in access. I was just wondering if there was a better way to do it in sql. Thank you.

Thanks in Advance!
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000