Skip to content
Advertisement

Error by foreign key use in MySQL Workbench,error code 1064

1.Hello I have a problem with my SQL code.I become Error Code: 1064. You have an error in your SQL syntax.

2.Error:13:05:36 ADD CONSTRAINT FK_ID_Mannschaft FOREIGN KEY (ID_Mannschaft) REFERENCES Mannschaft(ID_Mannschaft) ON UPDATE CASCADE ON DELETE CASCADE Error Code: 1064. 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 ‘ADD CONSTRAINT FK_ID_Mannschaft FOREIGN KEY (ID_Mannschaft) REFERENCES `Man’ at line 1 0.032 sec

Advertisement

Answer

Assuming the structure given below, no error found, pls check data type and constraint.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement