11
MySQL删除一些外键
我有一个表,该表的主键在其他几个表中使用,并且对其他表有几个外键。 CREATE TABLE location ( locationID INT NOT NULL AUTO_INCREMENT PRIMARY KEY ... ) ENGINE = InnoDB; CREATE TABLE assignment ( assignmentID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, locationID INT NOT NULL, FOREIGN KEY locationIDX (locationID) REFERENCES location (locationID) ... ) ENGINE = InnoDB; CREATE TABLE assignmentStuff ( ... assignmentID …