SELECT TRANS_ID
FROM TRANS_INST
WHERE connect_by_isleaf=1
START WITH TRANS_ID =480242
CONNECT BY PRIOR UP_TRANS_ID = TRANS_ID;
說明:
表TRANS_INST(TRANS_ID,UP_TRANS_ID)
480242表示樹的任何一個節(jié)點
TRANS_ID子節(jié)點
UP_TRANS_ID父節(jié)點
更多信息請查看IT技術(shù)專欄