场景:常见的领导关系树结构,知道某一节点ID,要查出此节点的所有下级(直接下级和间接下级),此时需要使用SQL递归语句。
oracle中的递归语句:
start with 
connect by prior
.
select parent,child from test start with pid='a'
connect by prior id=pid 发表于 @ 2007年07月19日 12:22:00 | 评论( loading... ) | 举报| 收藏