use instead of trigger for blocking delete

ALTER TRIGGER [dbo].[ToBlockDeleting]
   ON  [dbo].[t]
   INSTEAD   OF   DELETE 
AS 
BEGIN

 
 update t set flag=flag+1 where t.id=(select  id from deleted)
 

END

GO
posted @ 2012-04-27 16:31  zyip  阅读(138)  评论(0)    收藏  举报