
Posted on: 8 months ago
Cannot drop column: needed in a foreign key constraint
Column, Drop, Foreign Key, MySQL
83 | 0 | 0
Solution:
Step 1: First drop foreign key constraint
ALTER TABLE `table_name` DROP FOREIGN KEY `column_foreign_key_constraint_foreign`;
Step 2: Then drop table column
ALTER TABLE `table_name` DROP COLUMN `column_name`;
Welcome to CodePits.
CodePits provide a collection of tutorials about many programming languages like PHP, Laravel Framework, Codeigniter Framework, Mysql Database, Bootstrap Front-end Framework, Jquery, Node JS, Ajax Example, APIs, CURL Example, Composer Packages Example, AngularJS, Ionic Framework, etc. 🙌
Other Posts
Categories
Tags
Comment
Comments (0)
🤔
No comments yet, be the first to help
load more