start with connect by 用法
Oracle中的select語句可以用start with...connect by prior子句實現遞迴查詢,connect by 是結構化查詢中用到的,其基本語法是:
點選(此處)摺疊或開啟
select ... from
where
start with
connect by
運算子PRIOR被放置於等號前後的位置,決定著查詢時的檢索順序。
PRIOR被置於CONNECT BY子句中等號的前面時,則強制從根節點到葉節點的順序檢索,即由父節點向子節點方向通過樹結構,我們稱之為自頂向下的方式。如:
CONNECT BY PRIOR id=root_id,PIROR運算子被置於CONNECT BY 子句中等號的後面時,則強制從葉節點到根節點的順序檢索,即由子節點向父節點方向通過樹結構,我們稱之為自底向上的方式。例如: CONNECT BY id=PRIOR root_id ,在這種方式中也應指定一個開始的節點。
例:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21251711/viewspace-1066371/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- start with...connect by prior用法
- start with ... connect by用法簡介
- 請教start with ......connect by prior .....用法
- [轉載] Oracle:start with...connect by子句的用法Oracle
- Oracle中start with...connect by prior子句用法.docOracle
- start with ... connect by
- start with connect by prior
- Oracle Start with ....Connect ByOracle
- START WITH...CONNECT BY
- START WITH and CONNECT BY in Oracle SQLOracleSQL
- connect by..start with..
- start with ...connect by --轉載
- oracle中start with connect by priorOracle
- connect by ...[prior]...start with 學習
- start with ... connect by用法簡介 sql有向圖問題期待新解決方案SQL
- Oracle start with connect by PostgreSQL recursive cteOracleSQL
- oracle connect by用法Oracle
- 分析函式connect by | start with學習函式
- [求助] start with connect by 奇怪的問題
- START WITH...CONNECT BY PRIOR簡單使用
- Oracle 樹操作(select…start with…connect by…prior)Oracle
- 樹型結構start with..........connect by prior
- PHP的ob_start();用法PHP
- 【--SQL基礎-->層次化查詢(START BY ... CONNECT BY PRIOR)】SQL
- Oracle 樹查詢 效能最佳化紀實(start with, connect by)Oracle
- 【SQL 學習】層次化查詢之CONNECT BY 和 START WITHSQL
- [轉載]使用Oracle樹形查詢應注意 - Start with / Connect byOracle
- ORACLE 樹形查詢(connect by...start with...)的應用(三)Oracle
- ORACLE 樹形查詢(connect by...start with...)的應用(一)Oracle
- 10.2.0.2中使用start with connect by 報ORA-00600錯誤的問題
- Oracle優化案例-定位start with connect by遞迴死迴圈資料(二十二)Oracle優化遞迴
- why app_start startAPP
- A New Start
- the new start
- CONNECT BY 擴充套件用法,實現獲取bom級聯擴充套件數量套件
- fast_start_parallel_rollback與v$fast_start_servers和v$fast_start_transactionsASTParallelServer
- Extract or Replicat Fail to Start (Don't Start) With No Error MessagesAIError
- crsctl start/stop crs and crsctl start/stop cluster 區別