SQL觸發器聯級刪除
Create TRIGGER [dbo].[trigInstructionsDelete] ON dbo.Instructions instead OF DELETE AS BEGIN DECLARE @InsId INT SELECT @InsId=InstructionsID FROM deleted --删除 DELETE dbo.Transfer WHERE InstructionsID=@InsId DELETE dbo.Instructions WHERE InstructionsID=@InsId END