更新主键时的update触发器!

如果一个表的主键进行了修改,在update触发器中,如何使表inserted和表deleted中的记录进行关联?
---------------------------------------------------------------

--用临时表
select id=identity(int,1,1),* into #i from inserted
select id=identity(int,1,1),* into #d from deleted
select * from #i i join #d d on i.id=d.id
---------------------------------------------------------------

是的!

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus