How to drop column with all related foreign key and other constraint in mysql ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AFAIK on MySQL you have to manually delete the constraints before dropping the column.
The ON DELETE CASCADE clause would affect the table only if you created the constraint with that clause and it is only needed to delete the foreign rows connected with that table with that constraint.