Popular Posts
javax.net.ssl.SSLHandshakeException: Connection closed by peer in Android 5.0 Lollipop Recently, there is a error occurs when access website via ssl connection like below although it worked fine several days ago. // Enable SSL... Hierarchical Query Start with connect by prior 階層式查詢用法 SELECT s.role_id, s.role_name, s.role_base_on, b.role_name role_base_on_name FROM m_usr_role s... Tired of Hibernate? Try JDBI in your code JDBI Quick sample ICategoryDAO.java : create a data access interface (implement is not required) package com.prhythm.erotic.task.data....
Stats
Hierarchical Query
Start with connect by prior 階層式查詢用法
SELECT
  s.role_id,
  s.role_name,
  s.role_base_on,
  b.role_name role_base_on_name
FROM m_usr_role s
LEFT JOIN m_usr_role b ON b.role_id = s.role_base_on
ROLE_ID                              ROLE_NAME                                          ROLE_BASE_ON                         ROLE_BASE_ON_NAME                                  
------------------------------------ -------------------------------------------------- ------------------------------------ -------------------------------------------------- 
system.administrator                 系統管理員                                          common.logon.user                    登入帳號                                            
85e9953c-00fd-4a0c-979c-7a41bd3f085a 初學者                                             231570cd-832f-40e3-b198-fb2336245926 訪客                                               
868a17dd-7d21-48a6-b2d5-f9a80313414a 初級專家                                            85e9953c-00fd-4a0c-979c-7a41bd3f085a 初學者                                             
3e9a45b1-82f5-49df-8be6-d67df54760c9 中級專家                                            868a17dd-7d21-48a6-b2d5-f9a80313414a 初級專家                                            
bd6eb9b1-05a3-4059-bc99-90258a7e8d86 高級專家                                            3e9a45b1-82f5-49df-8be6-d67df54760c9 中級專家                                            
886cd029-db55-48ca-8835-d9c2e02fccad 初級顧問                                            bd6eb9b1-05a3-4059-bc99-90258a7e8d86 高級專家                                            
0dec42e1-7de3-4a67-be15-97fbea759771 中級顧問                                            886cd029-db55-48ca-8835-d9c2e02fccad 初級顧問                                            
f5648453-32a5-42c3-8ec1-3b31d0d812fd 高級顧問                                            0dec42e1-7de3-4a67-be15-97fbea759771 中級顧問                                            
231570cd-832f-40e3-b198-fb2336245926 訪客                                                                                                                                       
common.logon.user                    登入帳號                                                                                                                                    

10 個資料列已選取


SELECT
  role_id,
  role_name,
  role_base_on
FROM m_usr_role
START WITH role_name = '高級顧問'
CONNECT BY PRIOR role_base_on = role_id
ROLE_ID                              ROLE_NAME                                          ROLE_BASE_ON                         
------------------------------------ -------------------------------------------------- ------------------------------------ 
f5648453-32a5-42c3-8ec1-3b31d0d812fd 高級顧問                                            0dec42e1-7de3-4a67-be15-97fbea759771 
0dec42e1-7de3-4a67-be15-97fbea759771 中級顧問                                            886cd029-db55-48ca-8835-d9c2e02fccad 
886cd029-db55-48ca-8835-d9c2e02fccad 初級顧問                                            bd6eb9b1-05a3-4059-bc99-90258a7e8d86 
bd6eb9b1-05a3-4059-bc99-90258a7e8d86 高級專家                                            3e9a45b1-82f5-49df-8be6-d67df54760c9 
3e9a45b1-82f5-49df-8be6-d67df54760c9 中級專家                                            868a17dd-7d21-48a6-b2d5-f9a80313414a 
868a17dd-7d21-48a6-b2d5-f9a80313414a 初級專家                                            85e9953c-00fd-4a0c-979c-7a41bd3f085a 
85e9953c-00fd-4a0c-979c-7a41bd3f085a 初學者                                             231570cd-832f-40e3-b198-fb2336245926 
231570cd-832f-40e3-b198-fb2336245926 訪客                                                                                    
8 個資料列已選取

reference : Start with connect by prior 階層式查詢用法