直接上代碼:segmentfault
把字符串a,b轉換成查詢列表spa
SELECT REGEXP_SUBSTR('a,b', '[^,]+', 1, ROWNUM) NET_CODE FROM DUAL CONNECT BY ROWNUM <= (LENGTH('a,b') - LENGTH(REGEXP_REPLACE('a,b', ',', '')) + 1)
結果以下:code