关于mysql workbench的基础报错,谢谢!
create table restaurant(
r_id varchar(2),
i_id varchar(60),
name varchar(60),
e_id varchar(20),
primary key(r_id)
**** foreign key(item_id) ****
references item,
foreign key(e_id)
references employees
);
create table item(
item_id varchar(60),
name varchar(60),
quantity varchar(60),
price float
**** primary key(item_id) ****
);
create table t_order(
o_id varchar(60),
total float(4,2),
datetime integer,
i_id varchar(60),
e_id varchar(20),
c_id varchar(500),
primary key(o_id),
foreign key(i_id)
references item,
foreign key(e_id)
references employee,
foreign key(c_id)
**** references customer;
); ****
**** create table employees( ****
e_id varchar(20),
salary float(5 , 2),
name varchar(20),
gender int,
address int,
primary key(e_id)
);
error1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near line (加**** ****的地方),4处错误
在第四个table 报error1050 - table employees already exist
尝试搜索了error1064的解决办法,但都没效果,请问这个error到底怎么解决啊quq
error1050 检查了几次确实是新建的,
是根据自己画的er diagram输入的数据,而且第一次用workbench555
谢谢了~~