DROP statement not working
Error Code: 3730. Cannot drop table 'customers' referenced by a foreign key constraint 'constraints_1' on table 'sales'.
what does this error mean please?
2 answers ( 0 marked as helpful)
Hi Bassey!
Thanks for reaching out.
You have to delete the foreign key name instead of the column name and it will work. Please, use the following code:
ALTER TABLE sales
DROP FOREIGN KEY constraints_1;
Hope this helps.
Best,
Tsvetelin
Bwfore writing you code you should drop foreign kein in sales table I think.