CREATE TRIGGER test_T1 ON dbo.T1
FOR insert
AS
declare @errno int, @errmsg varchar(255)
begin
UPDATE t1
SET t1.c= b+1
FROM t1, inserted
WHERE t1.a= inserted .a
end
return
error:
raiserror @errno @errmsg
rollback transaction
CREATE Trigger eTR_T1_INT
On dbo.T1
For Insert
/*编译通过*/
As
Begin
update T1
set c=b+1
from inserted
end