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表示樹的任何一個(gè)節(jié)點(diǎn)
TRANS_ID子節(jié)點(diǎn)
UP_TRANS_ID父節(jié)點(diǎn)
更多信息請(qǐng)查看IT技術(shù)專欄