我想使用触发器但是可以使用单个触发器进行插入/更新/删除...我已经完成了删除操作。见下文。
ALTER TRIGGER [dbo].[CleanUpDate]
ON [dbo].[Marks]
FOR DELETE
AS
BEGIN
DELETE FROM Grades
FROM Grades
JOIN deleted ON Grades.ID = deleted.ID
END
由于
答案 0 :(得分:1)
是的,请参阅ALTER TRIGGER reference。
ALTER TRIGGER [dbo].[CleanUpDate]
ON [dbo].[Marks]
FOR DELETE, UPDATE, INSERT
AS
-- ...