I've created 2 tables one named (Config) and the other one (Records):
CREATE TABLE Config(
configID VARCHAR(100) NOT NULL,
featureID VARCHAR(100) NOT NULL,
bpID VARCHAR(100),
PRIMARY KEY (configID, featureID)
);
CREATE TABLE Records(
tID VARCHAR(100) NOT NULL,
configID VARCHAR(500) NOT NULL,
PRIMARY KEY (tID),
FOREIGN KEY (configID) REFERENCES Config (configID) ON DELETE CASCADE
);
I want to remove the constraint "ON DELETE CASCADE" from the second table. I tried to delete the FK first and then delete the table to re-create it but I'm getting this error "Error of rename (Error: 152)".
Any suggestions? Thank you,
Two suggestions: