日期:2014-05-18 浏览次数:20423 次
create trigger tr_db1_update on db1 for update as if update(pr1) update a set pr2 = i.pr1 from db2 a,inserted i where a.id = i.id and a.it = i.it and a.pid = 99 and i.oid = 99 go
------解决方案--------------------
改改
Create trigger tr_db1 on db1 for update as if not update(pr1) return update a set pr2=i.pr1 from inserted i inner join db2 as a on i.ID=a.ID and i.IT=a.IT and i.oid=a.pid and i.oid=99
------解决方案--------------------
Create trigger test on db1 for update as if not update(pr1) update a set pr2=i.pr1 from inserted i join db2 a on i.ID=a.ID and i.IT=a.IT and i.oid=a.pid and i.oid=99