Home > Database > phpMyAdmin > body text

What should I do if phpmyadmin reports an error when setting the ID primary key to auto-increment?

藏色散人
Release: 2020-04-01 10:06:28
Original
2718 people have browsed it

What should I do if phpmyadmin reports an error when setting the ID primary key to auto-increment?

What should I do if phpmyadmin reports an error when setting the id primary key to auto-increment?

Beginners to PHP using phpmyadmin often encounter the problem of being unable to set the primary key to auto-increment when creating a table.

Only the sql statement can be used for help. In fact, it can be set in phpmyadmin. When modifying a field, drag it to the far right and you will see the auto-increment option.

Solution

LoginphpmyadminSelect a table in the database and select the structure.

Find the primary key that you want to set as auto-increment (if it has not been set yet, just click the key button).

Click [Modify].

In the row of field definitions displayed, drag the scroll bar of the browser to the far right to find the word A_I. This is the automatic value-added sign. Just tick it.

Click [Save], this time you will have an auto-incremented primary key.

The above is the detailed content of What should I do if phpmyadmin reports an error when setting the ID primary key to auto-increment?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!