我在运行此查询后立即通过phpmyadmin在mySql中创建表格
// deselect all
selected = this.$.{{array-selector-element-id}}.selected.slice(0);
for (i = 0, len = selected.length; i < len; i++) {
item = selected[i];
this.$.selector.deselect(item);
}
// select all
items = this.$.{{array-selector-element-id}}.items;
for (i = 0, len = items.length; i < len; i++) {
item = item[i];
this.$.selector.select(item);
}
此错误显示
答案 0 :(得分:1)
试试这个:
CREATE TABLE teacher (
id int(11) NOT NULL,
name varchar(45) NOT NULL,
gender ENUM('F', 'M') NOT NULL,
department varchar(32) NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (department) REFERENCES departments(name)
);
答案 1 :(得分:1)
试试这个
CREATE TABLE teacher (
id int(11) NOT NULL,
name varchar(45) NOT NULL,
gender ENUM('F','M') NOT NULL,
department varchar(32) NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (department) REFERENCES
departments(name)
);
了解更多Click