Oracle 行轉列pivot 、列轉行unpivot 的Sql語句總結

多行轉字符串 這個比較簡單,用||或concat函數能夠實現 select concat(id,username) str from app_user select id||username str from app_user 字符串轉多列 實際上就是拆分字符串的問題,可使用 substr 、instr、regexp_substr函數方式 字符串轉多行 使用union all 函數等方式 wm_
相關文章
相關標籤/搜索