The simple way would be to disable the foreign key check; make the changes then re-enable foreign key check.
SET FOREIGN_KEY_CHECKS=0; -- to disable them
SET FOREIGN_KEY_CHECKS=1; -- to re-enable them
More Related Contents:
- i have an error which i dont understand. can you help me? [closed]
- In SQL Server how to get the count of child if both parent and child are available [closed]
- Rank function in MySQL
- MySQL select 10 random rows from 600K rows fast
- Get a list of dates between two dates
- Count the number of occurrences of a string in a VARCHAR field?
- Find nearest latitude/longitude with an SQL query
- Simulate lag function in MySQL
- MySQL query String contains
- Best data type for storing currency values in a MySQL database
- Datetime equal or greater than today in MySQL
- How to get the next auto-increment id in mysql
- MySQL dynamic-pivot
- Entity-Attribute-Value Table Design
- How do I decide when to use right joins/left joins or inner joins Or how to determine which table is on which side?
- MySQL Workbench: How to keep the connection alive
- Filter by COUNT(*)?
- Deleting duplicate rows from a table
- MySQL concatenation operator
- SQL Group By with an Order By
- How create json format with group-concat mysql?
- MySQL LIKE query with underscore
- MySql – Way to update portion of a string?
- Using reserved words in column names
- MySQL INNER JOIN select only one row from second table
- What is the difference between SQL and MySQL? [closed]
- how to use a like with a join in sql?
- SQL (MySQL) vs NoSQL (CouchDB) [closed]
- How to convert a varchar column type to date type without losing the dates
- MySQL Multiple Joins in one query?