在oracle中表格
name telephone
王三/赵四/刘五 123/456/789
我想分割成
王三 123
赵四 456
刘五 789
在pl/sql中如何写
谢谢大家
------解决方案--------------------
tb表里只有一条数据……
name telephone
王三/赵四/刘五 123/456/789
- SQL code
select regexp_substr(name,'[^/]+',1,rownum) name,regexp_substr(telephone,'[^/]+',1,rownum) telephonefrom tb connect by rownum<=length(regexp_replace(name||'/','[^/]+'))