ORACLE树查询SQL语句

ORACLE查询树的最大层次:
select max( level)
from pub_classify cf
start with cf.classify_id = 101
connect by prior cf.classify_id = cf.parent_classify_id;


由叶子节点开始的查询
select * from pub_classify cf start with cf.classify_id=30244    
connect by prior cf.parent_classify_id = cf.classify_id;

你可能感兴趣的:(oracle,数据库,职场,休闲)