我执行以下触发器:
ALTER TRIGGER [dbo].[TestTrigger] ON [dbo].[TestTable]
after update as
Declare @Name As varchar(30)
update TestTable set [Name] = 'Rob Stanfield'
select @Name = [Name] from inserted
print @Name
GO
我正在执行的插入语句是:
INSERT INTO TestTable (name) VALUES ('Ed Watkins')
输出如下:
(1 row(s) affected)
Ed Watkins
(1 row(s) affected)
我希望输出是:
(1 row(s) affected)
Rob Stanfield
(1 row(s) affected)
我错过了什么?