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