alter trigger UserInfo_update--触发器(每次修改则触发) on UserInfo for update as declare @a int set @a=(select UserJifen from inserted) update UserInfo set UserTouXian= case when @a<100 then ‘贫民Θ1.gif‘ when @a<100 and @a<500 then ‘平民Θ2.gif‘ when @a>499 and @a<2000 then ‘财主Θ3.gif‘ when @a>1999 and @a<10000 then ‘地主Θ4.gif‘ when @a>9999 then ‘土豪Θ5.gif‘ else ‘不明身份Θ6.gif‘ end where UserID=(select UserID from inserted)
时间: 2024-11-09 07:53:52