Oracle递归

1.向下递归获取子节点

--根据二级获取下方的四五级节点
select * from table_name where level in('4','5')
start with id='二级节点ID'
connect by prior id=parent_id
--level:节点级别字段
--start with后定义根节点的位置
--connect by prior 本条ID等于下一条数据的parent_id

2.向上递归获取父节点 read more