复制代码 代码如下:
WITH fw_requestion_note_temp(old_apply_id) AS ( 取根节点放入临时表
SELECT old_apply_id FROM fw_requestion_note WHERE old_apply_id = eebcfbcdaef
根据已取到的数据递归取其字节点的数据
UNION ALL SELECT fwold_apply_id FROM fw_requestion_note fw
INNER JOIN fw_requestion_note_temp temp ON fwapply_id = tempold_apply_id ) SELECT old_apply_id FROM fw_requestion_note_temp