新手,想请教各位大佬这段代码哪里出错了-_-||
mysql> CREATE TABLE tb_dept9
-> (
-> id INT(11) PRIMARY KEY,
-> name VARCHAR(25),
-> deptId INT(11),
-> salary FLOAT,
-> CONSTRAINT fk_emp_dept
FOREING KEY (deptId) REFERENCES tb_dept(id)
-> );
ERROR 1064 (42000): 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 ‘FOREING KEY (deptId) REFERENCES tb_dept(id)
)’ at line 7
mysql数据库外键问题
最新推荐文章于 2021-01-19 12:35:48 发布