MySql Alter Syntax error with mulitple FK

Posted by acidzombie24 on Stack Overflow See other posts from Stack Overflow or by acidzombie24
Published on 2010-05-23T00:05:33Z Indexed on 2010/05/23 0:10 UTC
Read the original article Hit count: 188

Filed under:

If i do the first one i have no problem. When i do addition i get a syntax error. What is wrong with the syntax? The error says syntax error near [entire 2nd line]

alter table `ban_Status` add FOREIGN KEY (`banned_user`) REFERENCES `user_data`(`id`)


alter table `ban_Status` add FOREIGN KEY (`banned_user`) REFERENCES `user_data`(`id`),
FOREIGN KEY (`banning_user`) REFERENCES `user_data`(`id`),
FOREIGN KEY (`unban_user`) REFERENCES `user_data`(`id`)

© Stack Overflow or respective owner

Related posts about mysql