1

How to drop foreign key in innodb table?
ALTER TABLE locations1 DROP FOREIGN KEY fk_locations1(id); is this correct?

13ruce1337
  • 753
  • 1
  • 6
  • 13
user3308965
  • 41
  • 1
  • 6
  • 1
    Nope, that key has a name, just use that name (`DROP FOREIGN KEY fk_locations1;` most likely, if not, check your `SHOW CREATE TABLE` output for how the index is called). – Wrikken Mar 15 '14 at 22:48
  • You will find a solution for your problem in this SO response: http://stackoverflow.com/a/14122155/3388491 – oschlueter Mar 15 '14 at 22:48
  • Beside reading the manual (a good answer for this question is RTFM) I have PHPMYADMIN where I do such stuff and it shows me the command it used. Saves the time to look it up in the manual. – Itay Moav -Malimovka Mar 15 '14 at 22:56

0 Answers0