自动更新日期列的值为最大日期的触发器

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

CREATE TRIGGER autosettimeasmax
ON dbo.status
after INSERT, UPDATE
AS
    UPDATE dbo.status
    SET    mytime = '9999-12-31 23:59:59.000'
    WHERE  id IN(SELECT id
                 FROM   inserted)