#根据流程key查询所有的流程实例id(历史和运行时)
SELECT GROUP_CONCAT(t.PROC_INST_ID_) FROM ( SELECT PROC_INST_ID_ FROM ACT_RU_TASK where INSTR(PROC_DEF_ID_,'diagram-03') UNION SELECT PROC_INST_ID_ FROM act_hi_actinst where INSTR(PROC_DEF_ID_,'diagram-03'))t; DELETE FROM act_hi_actinst WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_hi_attachment WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_hi_comment WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_hi_detail WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_hi_identitylink WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_hi_identitylink WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_hi_procinst WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_hi_taskinst WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_hi_varinst WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_ru_event_subscr WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_ru_identitylink WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_ru_identitylink WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_ru_task WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_ru_variable WHERE INSTR('634226,634576',PROC_INST_ID_) ; DELETE FROM act_ru_execution WHERE INSTR('634226,634576',PROC_INST_ID_) ;
TRANSLATE with x English TRANSLATE with COPY THE URL BELOW Back EMBED THE SNIPPET BELOW IN YOUR SITE Enable collaborative features and customize widget: Bing Webmaster Portal Back 标签:activiti,WHERE,INSTR,act,实例,INST,sql,PROC,ID From: https://www.cnblogs.com/g177w/p/17015035.html