-
Reset the auto increment value for a MySQL table
If you want to reset the auto increment value of a MySQL auto incremental primary key to a new value for your table either higher or lower than what it would otherwise next be.
Suppose that you want to begin the next time you insert a record into this table the value of the auto incremental primary key will be 5000 .
Note :If the highest value for the column is already greater than 5000 then it will be set to the highest value plus 1.
ALTER TABLE table_name AUTO_INCREMENT = 5000
If you want to do that from PhpMyadmin ,all of what you need to do is :
- select DataBase.
- select table.
- click the “Operations” tab .
- Enter the auto_increment new value and press on Go button.
Note that the Auto_increment value will be equal to the Max number for the primary key + 1 ,if there is a value higher than the one you have specified for auto_increment.
How to Install Citrix XenServer from a USB Key (USB built from Windows OS) CloudStack Configure VPN Access on Windows 7
Reset the auto increment value for a MySQL table
Recent Posts
Categories
Archives
Comments are currently closed.