Answers for "remove cascade from foreign key mysql"

1

mysql remove foreign key constraint

ALTER TABLE jobs DROP FOREIGN KEY constraint_name
Posted by: Guest on August-08-2020
2

add on delete cascade to existing foreign key

ALTER TABLE TABLEName
drop CONSTRAINT FK_CONSTRAINTNAME;

ALTER TABLE TABLENAME
ADD CONSTRAINT FK_CONSTRAINTNAME
    FOREIGN KEY (FId)
    REFERENCES OTHERTABLE
        (Id)
    ON DELETE CASCADE ON UPDATE NO ACTION;
Posted by: Guest on July-16-2021

Code answers related to "remove cascade from foreign key mysql"

Browse Popular Code Answers by Language