Oracle comma segmentation, column-to-Row, Row-to-column, oracle comma
SQL code column-to-row
SelectREGEXP_SUBSTR (. rolecode, '[^,] +', 1, l) rolecodefrom (select 'a, aa, aaa' rolecode from dual), (select level l from dual connect by level <= 100) bWHERE l <= LENGTH (. rolecode)-LENGTH (REPLACE (rolecode, ',') + 1
Or
With a as (select 'abc, AA, AD, ABD, JI, CC, ALSKD, ALDKDJ 'id from dual) select regexp_substr (id,' [^,] + ', 1, rownum) id from aconnect by rownum <= length (regexp_replace (id, '[^,] + '))
SQL code row to Column
Select name, coures, to_char (wmsys. wm_concat (xxx. score) c from (select 'xiaoming 'name, 'China' coures, 90 score from dual union all select 'xiaoming' name, 'China' coures, 91 score from dual union all select 'xiaoming 'name, 'mathematical' coures, 90 score from dual union all select 'xiaoming 'name, 'mathematical' coures, 91 score from dual) xxx group by xxx. name, coures