declare @state int
declare @audit_state int
set @state = 2
set @audit_state =5
select @state=STATE,@audit_state=AUDIT_STATE from inserted
update BX_Project set active = 0 where STATE=@state or AUDIT_STATE=@audit_state
我想的是当state=2或者audit_state=5的时候,更新BX_Project里的active的值为0,现在出现的问题是最后一句的state和audit_state无效,不知道错在哪里,刚接触触发器,不懂啊,求大神解答
什么数据库?