Home >Database >phpMyAdmin >How to set the default value of primary key in phpMyAdmin

How to set the default value of primary key in phpMyAdmin

silencement
silencementOriginal
2019-12-26 13:43:082807browse

How to set the default value of primary key in phpMyAdmin

When phpmyadmin creates a data table, the default value of the primary key is set as follows. At first we enter 30, then the field stu_id will increase automatically from 30

How to set the default value of primary key in phpMyAdmin

Click to execute

How to set the default value of primary key in phpMyAdmin

Insert another piece of data, let’s make the value empty

How to set the default value of primary key in phpMyAdmin

Click Insert

How to set the default value of primary key in phpMyAdmin

and you can see that Zhang San’s ID is 31, which is incremented based on the previous one (that is, starting from 30). If you do not set the default value of the primary key, it will increase automatically from 1.

It is recommended to study "phpmyadmin".

The above is the detailed content of How to set the default value of primary key in phpMyAdmin. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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