Home >Database >Mysql Tutorial >mysql 主键自增长_MySQL

mysql 主键自增长_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:43:56973browse

bitsCN.com mysql数据库表主键自增长的sql语句
1、不控制主键的起点
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、控制主键的起点
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;
bitsCN.com

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