sql 按符号切割长字符串为多行

select regexp_substr(t.mywords , '[^,]+', 1, rownum,'i'), myid
from (select myid,mywords from tablename where myid='12345') t
connect by rownum <= LENGTH(t.mywords ) - LENGTH(REGEXP_REPLACE(t.mywords , ',', '')) + 1;

posted @ 2023-05-05 10:09  Shilo  阅读(93)  评论(0编辑  收藏  举报