日期:2014-05-18 浏览次数:20510 次
--大致如下,自行补充要更新表b的那个字段,及表b与表a的关联关系 create tirgger tupdate_a on a for update as if update(a1) and exists(select 1 from inserted,deleted where inserted.aid = deleted.aid and inserted.a1 = 1 and deleted.a1 = 5) begin update 表B set --自已补充 from inserted,deleted where inserted.aid = deleted.aid and inserted.a1 = 1 and deleted.a1 = 5 and inserted.aid = 表B.bid end