MySQL Removing Some Foreign keys

前端 未结 11 664
太阳男子
太阳男子 2020-11-28 01:55

I have a table whose primary key is used in several other tables and has several foreign keys to other tables.

CREATE TABLE location (
   locationID INT NOT         


        
11条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 02:09

    step1: show create table vendor_locations;

    step2: ALTER TABLE vendor_locations drop foreign key vendor_locations_ibfk_1;

    it worked for me.

提交回复
热议问题