1.ORDER SIBLINGS BY
与CONNECT BY PRIOR搭配使用,主要用于递归查询一颗树状组织结构时,能够将树本身的结构“原貌”展示出来(树状结构的根节点、枝节点、叶子节点呈现“树”状),定显示结果集时按树状在页面上的显示顺序展示数据。
例子如下:SELECT lpad(jdbt,lengthB(jdbt)+(LEVEL-1)*2),yyzy_id
FROM SYS_AIS02
WHERE sfxs=‘是‘
AND ML_ID=12000
START WITH SJJD_ID IS NULL
CONNECT BY PRIOR JD_ID = SJJD_ID
ORDER SIBLINGS BY SJJD_ID, JDXSSX;
oracle ORDER SIBLINGS BY,布布扣,bubuko.com
原文地址:http://blog.csdn.net/fengeh/article/details/25002587