Search This Blog

Saturday, September 16, 2017

Reset AUTO_INCREMENT Value in MySQL

You can reset the AUTO_INCREMENT value in MySQL either by using a SQL command or by using phpMyAdmin.

1. Using SQL Command:
 ALTER TABLE 'field_name' AUTO_INCREMENT =1;  

where,
- field_name is the name of the column whose AUTO_INCREMENT value you want to reset.

2. Using phpMyAdmin Operation:
 - First open the table whose AUTO_INCREMENT value you would like to reset.
 - Once inside the table click on the Operation tabs as shown in the image below.

Click on image to enlarge

3. To save the changes you've made, click on Go.

No comments:

Post a Comment

Thank you for your Feedback!
www.evagabond.me

Top Magento Hosting:

Top 5 Posts (Weekly)