3个回答
2013-01-04 · 知道合伙人互联网行家
关注
展开全部
tt1:表
sno grade 时间
2003 101 2013-01-01 00:00:00.000
2003 90 2012-12-29 00:00:00.000
2003 80 2012-12-29 00:00:00.000
2003 100 2012-12-29 00:00:00.000
create trigger bok
on tt1
for delete
as
declare @entertime datetime /***系统当前时间*****/
set @entertime=getdate()
select @entertime from deleted
if (select entertime from tt1)<@entertime
begin
print '删除成功'
end
else
begin
rollback transaction
end
sno grade 时间
2003 101 2013-01-01 00:00:00.000
2003 90 2012-12-29 00:00:00.000
2003 80 2012-12-29 00:00:00.000
2003 100 2012-12-29 00:00:00.000
create trigger bok
on tt1
for delete
as
declare @entertime datetime /***系统当前时间*****/
set @entertime=getdate()
select @entertime from deleted
if (select entertime from tt1)<@entertime
begin
print '删除成功'
end
else
begin
rollback transaction
end
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询