日期:2014-05-18 浏览次数:20424 次
Create trigger tr_T2 on T2 for update as update t1 set State=1 from deleted d inner join t1 on d.Code=t1.Code
------解决方案--------------------
create trigger my_trig on t1 for delete as begin update t1 set state = ... from t1 , deleted d where t1.code = d.code end
------解决方案--------------------
create trigger my_trig on t1 for delete
as
begin
update t1 set state = ... from t1 , deleted d where t1.code = d.code
end
------解决方案--------------------
create trigger tri_T2_deleted for delete as begin update T set state=需要更新的值 from T1 t,Deleted d where t.code=d.code end