Solved

How to reset an auto_increment column to 0 using phpMyAdmin?

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

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

749 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