Next, locate the highest value for the auto_increment column (say it is id) SELECT MAX(id) maxid FROM mydb. In phpmyadmin, just click the SQL tab, enter the command, and run it.įor a nonempty table, you may want to adjust the auto_increment attribute to the highest existing id in use in case higher entries were deleted.įirst, optimize the table OPTIMIZE TABLE mydb.mytable If you want to hose the data, then be my guest. Since this one of the most frequently asked questions for phpmyadmin, you can learn more about this in this blog : Supplemental Infoįor an empty table, another way to reset the auto_increment attribute is to run TRUNCATE TABLE mydb.tablename ĭon't run this if you have data in it. Locate the table you want to drop from the list shown in the right hand panel and click on Drop to delete the table. Second, use a condition to specify which rows to delete in the WHERE clause. Select the database that contains the table you wish to drop from the list shown in the left hand column. First, specify the table from which you delete data. Click on the Go button for the Table Options box. Quick Steps Login to cPanel and open up phpMyAdmin. 3 Answers Sorted by: 23 phpmyadmin Perhaps you could just select the phpMyAdmin Operations tab: In phpMyAdmin, click on the table you want to reset or change the AUTOINCREMENT value Click on the Operations Tab In the Table Options box find the autoincrement field.Enter the new auto_increment starting value.In the Table Options box find the auto_increment field.In phpMyAdmin, click on the table you want to reset or change the AUTO_INCREMENT value.Perhaps you could just select the phpMyAdmin Operations tab:
0 Comments
Leave a Reply. |