declare
v_str varchar2(50):='00xxx';
v_char varchar2(50):=null;
v_count number(10):=0;
begin
v_count:=length(v_str);
for i in 1..v_count loop
v_char:= substr(v_str,i,1);
dbms_output.put_line(v_char);
end loop;
end;
declare
v_str varchar2(50):='00xxx';
v_char varchar2(50):=null;
v_count number(10):=0;
begin
v_count:=length(v_str);
for i in 1..v_count loop
v_char:= substr(v_str,i,1);
dbms_output.put_line(v_char);
end loop;
end;
转载于:https://www.cnblogs.com/zfzf1/p/7489833.html