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

mysql 主键自增长_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:43:56
Original
960 people have browsed it

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

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