[quote=引用 1 楼 HJ_daxian 的回复:] select id,distinct regexp_substr(name, '[^,]+',1,level) name from document connect by level <= length(name) - length(replace(name,',','')) + 1
select id,distinct regexp_substr(name, '[^,]+',1,level) name from document connect by level <= length(name) - length(replace(name,',','')) + 1
表document里的数据: id name 1 a 2 b,c 3 a,b,c,d 4 b,c . . . . . . SQL语句查出的结果 1 a 2 b 2 c 3 a 3 b 3 c 3 d 4 b 4 c name中的“,”的个数不确定。。。 多谢!
17,086
社区成员
55,238
社区内容
加载中
试试用AI创作助手写篇文章吧