日期:2014-05-18 浏览次数:20411 次
delete from [Session] where ID in (select ID from deleted)
------解决方案--------------------
CREATE TRIGGER CheckSessionStatus_DELETE ON [Session] FOR DELETE AS delete from [Session] where DateDiff(minute, DateAdd(minute, 20, [Session].CreateTime), getdate()) > 0 and ID in(select ID from deleted)