IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_account_item_delete]') AND type = 'TR')
DROP TRIGGER [dbo].[mps_account_item_delete]
GO

 
create trigger [dbo].[mps_account_item_delete] on [dbo].[mps_account_item] for delete as
begin
 
 delete    mps_account_branch from deleted where  aib_aiid=ai_id 
 delete   mps_account_depart from deleted where  aid_aiid=ai_id 
 
end