connect by層內排序
Finally, the next example adds a START WITH clause to specify a root row for the hierarchy, and an ORDER BY clause using the SIBLINGS keyword to preserve ordering within the hierarchy:
SELECT last_name, employee_id, manager_id, LEVEL FROM employees START WITH employee_id = 100 CONNECT BY PRIOR employee_id = manager_id ORDER SIBLINGS BY last_name; LAST_NAME EMPLOYEE_ID MANAGER_ID LEVEL ------------------------- ----------- ---------- ---------- King 100 1 Cambrault 148 100 2 Bates 172 148 3 Bloom 169 148 3 Fox 170 148 3 Kumar 173 148 3 Ozer 168 148 3 Smith 171 148 3 De Haan 102 100 2 Hunold 103 102 3 Austin 105 103 4 Ernst 104 103 4 Lorentz 107 103 4 Pataballa 106 103 4 Errazuriz 147 100 2 Ande 166 147 3 Banda 167 147 3
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/756652/viewspace-242217/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- vxe-table 樹表格跨層級拖拽排序排序
- iTunes Connect 中修改後的內購(IPA)稽核所需的時間
- 打破內卷化,AppGallery Connect的全生命週期賦能方案APP
- 分享swoole/go底層內容Go
- Laravel connect oracleLaravelOracle
- database的connectDatabase
- 一文告訴你java NIO底層用到的那些connect、bind、listen、accept、closeJava
- INBOUND_CONNECT_TIMEOUT與SQLNET.INBOUND_CONNECT_TIMEOUT小結SQL
- jQuery table內容點選標題排序jQuery排序
- 按照NSArray內部的某個物件排序物件排序
- CocoaAsyncSocket---Connect (下)
- QObject::connect()函式Object函式
- connect your tunnel to CloudflareCloud
- python根據字典內的值實現排序Python排序
- mysql使用group by實現組內排序實戰MySql排序
- 使用Collections對list的內容進行排序排序
- INBOUND_CONNECT_TIMEOUT(zt)
- dojo.connect初解
- 17、Connect-the-dots(VulnHub)
- MQTT 協議 -- CONNECT & CONNACKMQQT協議
- Linux Use ODBC Connect OracleLinuxOracle
- Python connect zookeeper use the kazoo modulePython
- Host 'localhost' is not allowed to connect to this MySQL serverlocalhostMySqlServer
- SVN-Unable to connect to a repository at URL
- “Host ‘xxxx‘ is not allowed to connect to this MySQL server“MySqlServer
- Garmin Connect 活動分類
- ubuntu : xcb:could not connect to display.Ubuntu
- [20180416]connect by和nocycle.txt
- OpenID Connect Core 1.0 介紹
- HarmonyOS Connect認證測試
- Oracle start with connect by PostgreSQL recursive cteOracleSQL
- Connect:一個更好的 gRPCRPC
- redis connect timeout問題排查Redis
- SAP HUM事務程式碼HUMO裡顯示內層和外層HU資訊
- DRF內建過濾元件與排序元件結合使用元件排序
- PostgreSQL Oracle 相容性 - connect by 2SQLOracle
- Fatal NI connect error 12170 錯誤Error
- Host 'xxx' is not allowed to connect to this MySQL server.MySqlServer