Home > Database > phpMyAdmin > body text

How to set the default value of primary key in phpMyAdmin

silencement
Release: 2019-12-26 13:43:08
Original
2776 people have browsed it

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!

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