oracle拆分一个连续的字符串
create or replace procedure pc(
sss out varchar2
)
is
str varchar2(20):='ph,p,cod,do,cu';
en integer:=instr(str,',');
begin
while en!=0 loop
dbms_output.put_line(substr(str,0,en-1));
str:=substr(str,en+1,length(str));
en:=instr(str,',');
end loop;
dbms_output.put_line(substr(str,0,2));
end;
学习笔记