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`;
Technology MySQL
By Amit Ranjan • 16 Dec 2024 14:50:13 PM | 93 Views
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`;