MySQL: Force Drop Table with Foreign Keys
June 6th, 2009 by jeremychoneIf you try to drop a table that has some foreign keys, you will get an exception.
mysql> SET foreign_key_checks = 0; mysql> drop table ... mysql> SET foreign_key_checks = 1;
If you try to drop a table that has some foreign keys, you will get an exception.
mysql> SET foreign_key_checks = 0; mysql> drop table ... mysql> SET foreign_key_checks = 1;
October 4th, 2010 at 5:05 pm
Thanks
November 17th, 2010 at 12:05 pm
Thank you for this! I am not a great programmer and could not figure out all this database stuff without your help!
January 23rd, 2011 at 8:04 pm
Excellent tip, thanks