如將字符串‘張三,李四,王五,趙六,'轉換成
1. 張三
2.李四
3.王五
4.趙六
REGEXP_SUBSTR
查詢語句:
WITH TEST AS (SELECT ‘張三,李四,王五,趙六,' AS STR FROM DUAL)
SELECT DISTINCT REGEXP_SUBSTR(STR, '[^,]+', 1, LEVEL)
FROM TEST
CONNECT BY LEVEL<=LENGTH(STR)-LENGTH(REGEXP_REPLACE(STR,',',''))+1