oracleCONNECTBYPRIOR叶子节点查找根节点

来源:您讯学院 作者:0007 时间:2015-01-25 20:24:52
oracleCONNECTBYPRIOR叶子节点查找根节点

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表示树的任何一个节点

TRANS_ID子节点

UP_TRANS_ID父节点

Tag:oracleCONNECTBYPRIOR叶子节点查找根节点  

相关文章

    无相关信息
网友评论