IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[order_239_delete]') AND type = 'TR')
DROP TRIGGER [dbo].[order_239_delete]
GO
CREATE  trigger order_239_delete on order_239 for delete as
begin
   insert into mps_sync(sk_type,sk_bizid,sk_tag2,sk_operation,sk_objid) 
   select 1,ord_bizid,0,-1,ord_id from deleted 

-- 以下是用户定义的语句 
update order_241_2
set ord2_sfbd='否',ord2_whordid = 0
from deleted as m
where ord2_id = m.ord_ccid
-- 用户定义的语句完毕 

end