sql根据条件删除多个表中的数据


//获取流程实例id 
select process_instance_id from blade_process_purchase_request where order_code='2021060400002'
 //删除流程信息
delete bladex_flow.act_ru_task ,bladex_flow.act_ru_actinst ,bladex_flow.act_hi_varinst ,bladex_flow.act_hi_taskinst ,bladex_flow.act_hi_procinst 
from bladex_flow.act_ru_task,
	bladex_flow.act_ru_actinst,
	bladex_flow.act_hi_varinst,
	bladex_flow.act_hi_taskinst,
	bladex_flow.act_hi_procinst
where bladex_flow.act_ru_task.PROC_INST_ID_ = '2d361f7a-c488-11eb-866c-000c29e1f9a5' 
and bladex_flow.act_ru_actinst.PROC_INST_ID_ ='2d361f7a-c488-11eb-866c-000c29e1f9a5'
and bladex_flow.act_hi_varinst.PROC_INST_ID_ ='2d361f7a-c488-11eb-866c-000c29e1f9a5'
and bladex_flow.act_hi_taskinst.PROC_INST_ID_ ='2d361f7a-c488-11eb-866c-000c29e1f9a5' 
and bladex_flow.act_hi_procinst.PROC_INST_ID_ ='2d361f7a-c488-11eb-866c-000c29e1f9a5'

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM