将字符串’ccbdaefa’ 更改为 aabccdef 即字符串内部按照字符排序
select listagg(c1) within group (order by c1) col
from (
select SUBSTR('ccbdaefa',ROWNUM,1) c1
from dual
connect by level <= length('ccbdaefa') );
COL
----------------------------
aabccdef
将字符串’ccbdaefa’ 更改为 aabccdef 即字符串内部按照字符排序
select listagg(c1) within group (order by c1) col
from (
select SUBSTR('ccbdaefa',ROWNUM,1) c1
from dual
connect by level <= length('ccbdaefa') );
COL
----------------------------
aabccdef