摘要:
今天做代码审查时,看见以下一段触发器的创建脚本,我们一起来分析一下create trigger [trigger_puClassRoomType]on [dbo].[puClassRoomType]AFTER updateas declare @roomname nvarchar(100),@roomnumber nvarchar(100)select @roomname = TypeName,@roomnumber=TypeNumber from Insertedbeginupdate ExamingClasses set TypeName=@roomname where TypeNum.. 阅读全文