MySQL: Force Drop Table with Foreign Keys

June 6th, 2009 by jeremychone

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;

Leave a Reply