IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_job_update]') AND type = 'TR')
DROP TRIGGER [dbo].[mps_job_update]
GO
   
CREATE trigger [dbo].[mps_job_update] on [dbo].[mps_job] for update as
begin
 

update mps_account_operation set accop_back=0 
from inserted i , deleted d
where accop_jbid=i.jb_id and i.jb_id=d.jb_id and i.jb_back<>d.jb_back and i.jb_back=0 
 
end