ALTER TRIGGER triggerA
ON tableA
FOR update(age)
AS
declare @tmp int
set @tmp=(select top 1 id from inserted)
//tmp的值没变化
//在inserted 和deleted临时表中貌似只有age的值
//这个地方如何取到tableA.id 的值?
------解决方案--------------------
ALTER TRIGGER triggerA ON tableA FOR update AS begin declare @tmp int select @tmp = id from inserted end