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)
本文出自 “程序猿的家” 博客,请务必保留此出处http://962410314.blog.51cto.com/7563109/1429421
原文地址:http://962410314.blog.51cto.com/7563109/1429421