表如下
preant child
1 101
1 102
1 103
101 10101
101 10102
102 10201
103 10301
10101 1010101查询preant为1的所有child
1 101
1 102
1 103
1 10101
1 10102
1 10201
1 1010101
1 10301
1 1
怎么用connet by实现?
preant child
1 101
1 102
1 103
101 10101
101 10102
102 10201
103 10301
10101 1010101查询preant为1的所有child
1 101
1 102
1 103
1 10101
1 10102
1 10201
1 1010101
1 10301
1 1
怎么用connet by实现?
start with preant='1'
connect by prior child=preant
parent child
1 101
1 102
1 103
表如下
preant child
1101
1102
1103
10110101
10110102
10210201
10310301
101011010101
1的child有101,102,103
101的child有10101,10102
10101的child有1010101关系就出来了
1的下级包括
101,102,103,10101,10102,1010101