Solved

How to reset an auto_increment column to 0 using phpMyAdmin?

Posted on 2010-11-11
3
651 Views
Last Modified: 2012-05-10
Experts,

I am using phpMyAdmin v. 2.7.0 and I have a column which uses auto_increment.  I've been testing some php functionality and now the auto_incrament column is up to 20000+.  I'd like to restart the numbering back to 0...is this possible?

Any help would be much appreciated.  Thanks.

EVM
0
Comment
Question by:evibesmusic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Accepted Solution

by:
CyberGhost earned 250 total points
ID: 34116040
truncate the table... I don't believe there is any other way, as altering it would possibly create duplicate primary keys
0
 
LVL 55

Assisted Solution

by:Huseyin KAHRAMAN
Huseyin KAHRAMAN earned 250 total points
ID: 34116265
rename the old one, create a new table...
0
 

Author Closing Comment

by:evibesmusic
ID: 34116317
Good to know.  Thank you to both of you for your insight...easy points.
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question