CONNECT BY 介绍以及用法
CONNECT BY作用是,NNECT BY用来查询树形数据,
CONNECT BY 语句的用法
语句格式:
start with 条件A
connect by prior orgid = parentorgid
用法
情况1:
start with 条件A
connect by prior orgid = parentorgid
情况2:
start with 条件A
connect by orgid = prior parentorgid
情况3:
start with 条件A
connect by orgid = parentorgid
特殊用法:结合rownum,查询序列,日期