oracle 查询结果用逗号分割成多行 迷南。 2021-12-12 11:27 353阅读 0赞 with tmp as ( select t.\*, length(ATTACH\_LABEL\_CODE)-length(regexp\_replace(ATTACH\_LABEL\_CODE, ',', ''))+1 len from dev\_bitem\_file\_relation t where ATTACH\_LABEL\_CODE is not null ) select file\_id, regexp\_substr(ATTACH\_LABEL\_CODE, '\[^,\]+', 1, rn) ATTACH\_LABEL\_CODE from tmp a, (select rownum rn from dual connect by level <= (select max(len) from tmp x)) b where a.len>=b.rn
还没有评论,来说两句吧...