yuyee

          oracle中的遞歸查詢

          start with .... connect by prior.....,如果prior缺省,則只能查詢符合條件的起始行,并不能遞歸
          從root到末梢:select * from permissiontable t start with parentid=1 connect by prior id=parentid
          從末梢到root:select * from permissiontable t start with id=32 connect by prior parentid=id

          posted on 2010-10-25 15:55 羔羊 閱讀(204) 評論(0)  編輯  收藏 所屬分類: oracle

          主站蜘蛛池模板: 永州市| 星子县| 昌邑市| 嘉黎县| 东乌| 深圳市| 济宁市| 壶关县| 万州区| 牙克石市| 平乐县| 突泉县| 和龙市| 阜阳市| 团风县| 宜城市| 修水县| 东台市| 缙云县| 方正县| 佳木斯市| 灵璧县| 连南| 独山县| 曲阜市| 手游| 昌宁县| 浙江省| 贡嘎县| 宣恩县| 定西市| 阳谷县| 泸西县| 忻州市| 会昌县| 麻江县| 沙雅县| 桦甸市| 乐陵市| 浦北县| 恩平市|