mysql自增id表的字段怎么设置

如题所述

第1个回答  推荐于2018-03-14
create table cdat
(
localt char(20) not null,
cd char(5) not null,
snosat char(2) not null,
rnorec char(3) not null,
id INT(20) not null AUTO_INCREMENT,
primary key (id)
);
主键只能有一个,要设置索引的话请用index。是AUTO_INCREMENT, 不是auto0increment本回答被网友采纳
第2个回答  2016-10-15
不是创建表的是 添加auto_increment 的吗
相似回答