--存储过程create proc up_update as update taba set taba.b = tabb.b from tabb --楼主要记得这里 where taba.a = tabb.a--触发器create trigger utr_update on tabb for insert as update taba set taba.b = b.b from inserted b --楼主要记得这里 where taba.a = b.a
谢谢 非常感谢 其实就是UPDATE tabA set tabA.a=tabB.b from tabB where tabA.a=tabB.b
UPDATE tabA set tabA.b=tabB.b from tabA inner join tabB on tabA.a=tabB.a
--存储过程create proc up_update
as
update taba
set taba.b = tabb.b
from tabb --楼主要记得这里
where taba.a = tabb.a--触发器create trigger utr_update on tabb
for insert
as
update taba
set taba.b = b.b
from inserted b --楼主要记得这里
where taba.a = b.a
其实就是UPDATE tabA set tabA.a=tabB.b from tabB where tabA.a=tabB.b