复制代码 代码如下:
WITH fw_requestion_note_temp(old_apply_id) AS ( –取根节点放入临时表
SELECT old_apply_id FROM fw_requestion_note –WHERE old_apply_id = ‘e741470e-8b5c-4f91-9b03-c7474d103aef’
–根据已取到的数据递归取其字节点的数据
UNION ALL SELECT fw.old_apply_id FROM fw_requestion_note fw
INNER JOIN fw_requestion_note_temp temp ON fw.apply_id = temp.old_apply_id ) SELECT old_apply_id FROM fw_requestion_note_temp
原创文章,作者:306829225,如若转载,请注明出处:https://blog.ytso.com/236292.html
赞 (0)