Solved

How to reset an auto_increment column to 0 using phpMyAdmin?

Posted on 2010-11-11
3
638 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
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 51

Assisted Solution

by:HainKurt
HainKurt 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now