I execute the following trigger:
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
The insert statement I am executing is:
INSERT INTO TestTable (name) VALUES ('Ed Watkins')
The output is as follows:
(1 row(s) affected)
Ed Watkins
(1 row(s) affected)
I expect the output to be:
(1 row(s) affected)
Rob Stanfield
(1 row(s) affected)
What am I missing?