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