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‘

  

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

上一篇:oracle下对sql的解析步骤


下一篇:ASP.NET Core配置SQLite数据库连接