我在做论坛,论坛里有个帖子置顶功能,我想给置顶加个时间限制,也就是说如果置顶2小时,那么2小时之后就把置顶取消, 
我是在post表里加入post_top,和post_todate两列,post_top为0时,不置顶,为1时置顶; 
post_todate是到期时间。 在程序中设置置顶的时候 update post_top=1,然后update post_todate=现在的时间+X小时。 然后在 现在的时间+X小时后,程序自动取消置顶,我的想法是 现在的时间+X小时 后用触发器将 post_top=0. 如果要实现这个功能该怎么做?本来我是这样写触发器的
create trigger trigger_highpost 
on xxmimi.dbo.post 
for update 
as 
begin 
update post set post_top='0' where post_todate <=getdate() 
end 这个触发器我一启用程序就出错,我一禁用程序就正常了。。 
感觉应该是getdate()的问题。 很多人说触发器不能做,我想问,如果实现这个功能将怎么做?