How to realize the self-growth of primary key in mysql
This article will explain in detail how to achieve self-growth of primary keys in mysql, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Sql statement for self-growth of primary key in mysql table
1. Do not control the starting point of the primary key
Create table emb_t_dictBusType
(
Emb_c_busTypeID int not null auto_increment
Emb_c_busTypeEnName varchar (255) not null
Emb_c_busTypeZhName varchar (255) not null
Primary key (emb_c_busTypeID)
) engine=INNODB default charset=gbk
2. Control the starting point of the primary key
Create table emb_t_dictBusType
(
Emb_c_busTypeID int not null auto_increment
Emb_c_busTypeEnName varchar (255) not null
Emb_c_busTypeZhName varchar (255) not null
Primary key (emb_c_busTypeID)
) engine=INNODB auto_increment=1001 default charset=gbk
On how to achieve primary key growth in mysql has been shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.