tags:

views:

18

answers:

1

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`)
+2  A: 

I think you need "add" before lines 2 and 3. That or you need to name your constraints.

edl
+1 I think it's the missing ADD.
Mark Byers
it was the add! (PS: Works on sqlserver w/o the add :x)
acidzombie24