tunaroll Posted May 8, 2007 Share Posted May 8, 2007 I have learned that an easy way to reset autonumbers in a table (so that the next available autonumber is consecutive) is to simply make a copy of the table (structure and data) then delete the original table and rename the copy to the original name. At work I frequently have to do this so I have been trying to figure a way to automate the process using autoit. I can't figure out a way using SQL (doesn't want to let me rename tables ) though I can create a table, move the data, drop the original table, create the table, then move the data back from the second table. The autonumbered fields (indexed id numbers) get whacked in the process. I am still pretty new to this stuff so maybe I am overlooking something. Has anyone got any ideas of how I can accomplish this? Thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now