Set the autoincrement value of the MySQL Data Table

Source: Internet
Author: User
Today, I encountered a strange problem. The operation table option of PHPMyAdmin does not have the AUTO_INCREMENT option. After a series of debugging, the bug PHPMyadmin4.0.2 was found. Upgrade PHPMyAdmin4.0.3 to solve this problem. In PHPMyAdmin4.0.3, you can easily set the auto-increment ID of a table.

Today, I encountered a strange problem. The option AUTO_INCREMENT is not available in the PHPMyAdmin operation table. After a series of debugging, we found the PHPMyadmin 4.0.2 bug. Upgrade PHPMyAdmin 4.0.3 to solve this problem. In PHPMyAdmin 4.0.3, you can easily set the auto-increment ID of a table.

Today, I encountered a strange problem. In the PHPMyAdmin operation> table option, the AUTO_INCREMENT option is not available.

After a series of debugging, we found thatPHPMyadmin 4.0.2. UpgradePHPMyAdmin 4.0.3This will be solved later.

DownloadedPHPMyAdmin 4.0.3In version, you can easily set the auto-increment ID value of a table, for example:

If you find that the PHPMyAdmin version you are using cannot set the AUTO_INCREMENT option, upgrade to the latest version or find another suitable version.

Set auto-increment values for SQL statements

The following example sets the automatic increment value of the table name "mytable" to 500, which means that the next time you insert a new record to this table, the automatic increment primary key value is 500.

If the maximum value of a field in the database is greater than 500, the automatic incremental ID value is set to the highest value plus 1.

ALTER TABLE mytable AUTO_INCREMENT = 500
Modify mytable to your data table name, and 500 to your expected increment value.

(...)
Read the rest of setting the MySQL Data Table auto increment value (10 words)

©Lixiphp for LixiPHP, 2013. | Permalink | No comment | Add todel. icio. us
Post tags: AUTO_INCREMENT, PHPMyAdmin, SQL

Feed enhanced by Better Feed from Ozh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.