create table `grade`(
`gradeid` VARCHAR(50) not null AUTO_INCREMENT comment '编号',
`gradename` VARCHAR(50) not null comment '名称',
primary key(`gradeid`)
)ENGINE=INNODB DEFAULT CHARSET=utf8;
[Err] 1063 - Incorrect column specifier for column ‘gradeid’
分析 因为 使用了 auto_increment 所以字段的;类型应该是 int 而不是其他的类型
修改
`gradeid` int(4) not null AUTO_INCREMENT comment '编号',
博客指出MySQL出现[Err] 1063错误,原因是使用auto_increment时,字段‘gradeid’类型不是int而是其他类型,需进行修改。
1万+

被折叠的 条评论
为什么被折叠?



