表字段:
删除id时:Error on rename of “.\examw\#sql-2a8_1” to “.\examw\tbl_examw_test_settings_area” (errno: 150) 报错
查询外键:SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME=”tbl_examw_test_settings_area”
删除id时:Error on rename of “.\examw\#sql-2a8_1” to “.\examw\tbl_examw_test_settings_area” (errno: 150) 报错
查询外键:SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME=”tbl_examw_test_settings_area”
解决方案
20
级联删除。http://blog.csdn.net/arduousbonze/article/details/3725590
20
可以试试SET FOREIGN_KEY_CHECKS = 0
让外键功能暂时失效。
让外键功能暂时失效。