📜  如果 boolean 为真,则 DELETE CASCADE - 任何代码示例

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

代码示例1
ALTER TABLE dbo.T2
   DROP CONSTRAINT FK_T1_T2   -- or whatever it's called

ALTER TABLE dbo.T2
   ADD CONSTRAINT FK_T1_T2_Cascade
   FOREIGN KEY (EmployeeID) REFERENCES dbo.T1(EmployeeID) ON DELETE CASCADE