You can turn off foreign key checks:
SET FOREIGN_KEY_CHECKS = 0;
/* DO WHAT YOU NEED HERE */
SET FOREIGN_KEY_CHECKS = 1;
Please make sure to NOT use this on production and have a backup.
More Related Contents:
- Mysql query to retrive data from join of three table [duplicate]
- how to create mysql database backup file in windows [closed]
- How to reduce the size of google spreadsheet using SQL?
- Inserting multiple rows in mysql
- How do I quickly rename a MySQL database (change schema name)?
- mysql Foreign key constraint is incorrectly formed error
- MySQL match() against() – order by relevance and column?
- MySQL query String contains
- Entity-Attribute-Value Table Design
- Mysql localhost != 127.0.0.1?
- How do I decide when to use right joins/left joins or inner joins Or how to determine which table is on which side?
- How can I loop through all rows of a table? (MySQL)
- Select columns across different databases
- LOAD DATA INFILE Error Code : 13
- MySql update two tables at once
- Returning query results in predefined order
- Table is ‘read only’
- Django MySQL full text search
- Proper database model for a user feedback system (an interesting case)
- MySQL Errno 150
- How to force MySQL to take 0 as a valid auto-increment value
- MySQL – Replace Character in Columns
- How do you manage databases in development, test, and production?
- MySQL LIKE vs LOCATE
- How to select non “unique” rows
- why this mysql event can’t get run?
- Is it unreasonable to assign a MySQL database to each user on my site?
- Mysql Counting the consecutive rows that match
- Create a new database with MySQL Workbench
- What are the benefits of only_full_group_by mode?