我有一棵这样的树:
Country
|
State
____|____
/ \
City_1 City_2
______|______
/ \
Neighborhood_1 Neighborhood_2
在我的数据库中,我有这样的记录:
| path |
|------------------------------------|
| Country |
| Country.State |
| Country.State.City1 |
| Country.State.City2 |
| Country.State.City1.Neighborhood_1 |
| Country.State.City1.Neighborhood_2 |
我想从路径中搜索,并获取该路径的所有节点的所有记录,不包括匹配分支中的内容,如下所示:
| path |
|------------------------------------|
| Country |
| Country.State |
| Country.State.City1 |
| Country.State.City1.Neighborhood_1 |
答案 0 :(得分:0)