日期:2014-05-17 浏览次数:20570 次
create trigger trig_Delete_RelationTree on RelationTree INSTEAD OF delete
AS
EGIN
declare @ID int
declare @Mark int
SET NOCOUNT ON;
IF exists (select count(*) from deleted)
BEGIN
select @ID = id, @Mark = Mark from deleted
IF(@Mark < 100)--
BEGIN
delete RelationTree where ParentID = @ID;
END
END
END