oracle遍歷查詢,列轉行

--列合併
--wm_concat(列名),該函數能夠把列值以","號分隔起來,並顯示成一行
--dbms_lob.substr 將clob轉字符串
-- start with.....connect by ..=prior.. 遍歷查詢全部子節點的父節點
select dbms_lob.substr(wm_concat(name)) as name
  from (select name
          from table  where type='abc'
         start with id= '6208bcb7:164c70cf84d:-7fce'
        connect by id= prior pid
         order by levelno)
相關文章
相關標籤/搜索