-- 查询id=100的所有父节点 select * from TABLE start with id = 100 connect by nocycle prior pid = id -- 查询id=100的所有子节点 select * from TABLE start with id = 100 connect by nocycle prior id = pid
-- 查询id=100的所有父节点 select * from TABLE start with id = 100 connect by nocycle prior pid = id -- 查询id=100的所有子节点 select * from TABLE start with id = 100 connect by nocycle prior id = pid
转载于:https://www.cnblogs.com/jieyuefeng/archive/2013/05/10/3071280.html