SQL语句:
create table t_employee(
e_id int unsigned AUTO_INCREMENT,
e_num varchar(20) NOT NULL,
e_name varchar(10) NOT NULL,
e_sxe ENUM('男','女') NOT NULL,
e_age int NOT NULL,
e_tel varchar(11) NOT NULL,
e_icnumber varchar(20),
PRIMARY KEY (e_id)
);
出现错误:
navicat > 1291 - Column 'e_sxe' has duplicated value '?' in ENUM
问题所在:未设置字符编码格式。
更正语句:
create table t_employee(
e_id int unsigned AUTO_INCREMENT,
e_num varchar(20) NOT NULL,
e_name varchar(10) NOT NULL,
e_sxe ENUM('男','女') NOT NULL,
e_age int NOT NULL,
e_tel varchar(11) NOT NULL,
e_icnumber varchar(20),
PRIMARY KEY (e_id)
)engine=InnoDB default charset=utf8;
成功解决:
ok !