mysql export sql dump alphabatically,which cause foreign key constraints error during import
- 阅读更多 关于 mysql export sql dump alphabatically,which cause foreign key constraints error during import
问题 I have 10 tables in my database(MySQL). two of them is given below tbl_state state_id |int(10) |UNSIGNED ZEROFILL auto_increment state_name |varchar(40) tbl_city city_id |int(10) |UNSIGNED ZEROFILL auto_increment city_name |varchar(40) | state_code |int(10) | UNSIGNED ZEROFILL (FK reference with tbl_state.state_id) Foreign Key Constraint : tbl_city.state_code is references to tbl_state.state_id . now my problem is when I export all tables and import again then it gives foreign key constraint