create trigger mytr on country
for delete
as
update smt_companyinfor set countrynewid=1 where countrynewid=(select id from deleted)
我的意思是只要删除country中的一条记录,表smt_companyinfor 对应的项就设置为1,请问这样写法可有问题,还有就是delete后的表的ID会发生变化,,,我where的ID是准确的么? 请高手能解答解答。。。谢谢...
------解决方案--------------------
update smt_companyinfor set countrynewid=1 where countrynewid in (select id from deleted)