日期:2014-05-16  浏览次数:20898 次

oracle创建复杂的树形视图
现有表1:
id(不重复)   父级id         地区名字         级别
dist_id             parent_id      dist_name     dist_type
1                           0                        中国               0
2                           1                        北京               1
52                         2                        北京               2
500                      52                     朝阳区            3
501                      52                     东城区            3
3                          1                        安徽                1
36                        3                        安庆                2
399                     36                     大观区             3
……………………………………………………

现有表2:
id(不重复)   营业厅                         地区id              地址
info_id           hall_name                   dist_id