📜  将删除级联添加到现有外键 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:15.795000             🧑  作者: Mango

代码示例1
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;