自從 oracle 9i 開始,就可以通過sys_connect_by_path 函數實現將從父節點到當前
行內容以“path”或者層次元素列表的形式顯示出來。
取得一個表的所有字段名,用逗號分割。
select max(substr(sys_connect_by_path(column_name, ','),2)) col from (
select column_name,column_id from user_tab_columns where table_name='&表名')
start with column_id=1
connect by column_id=rownum;
新聞熱點
疑難解答