标签: sql
当我从父表中删除记录时,我有这个触发器删除Jr.表的所有记录但我只想删除相关记录什么是建议的修改
CREATE TRIGGER ProductDeleted ON Product for DELETE AS BEGIN DELETE FROM OrderItem WHERE ProductID = (SELECT ProductID FROM DELETED) END