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是准确的么? 请高手能解答解答谢谢...
for delete
as
update smt_companyinfor set countrynewid=1 where countrynewid=(select id from deleted)我的意思是只要删除country中的一条记录,表smt_companyinfor 对应的项就设置为1,请问这样写法可有问题,还有就是delete后的表的ID会发生变化,,,我where的ID是准确的么? 请高手能解答解答谢谢...
set countrynewid=1
from smt_companyinfor a ,deleted b
where a.countrynewid = b.id