ALTER TRIGGER test_Rate ON dbo.tRate FOR insert AS declare @errno int, @errmsg varchar(255) begin UPDATE dbo.tRate SET vcUpdaterId=Inserted.iAutoId FROM dbo.tRate, inserted WHERE dbo.tRate.iAutoId= inserted .iAutoId end return error: raiserror @errno @errmsg rollback transaction