declare
i_c number(10) := 0;
i_s varchar2(10);
begin
while i_c <= length('1a2b3c4,5.6/7中8国9english0') loop
i_c := i_c + 1;
select substr('1a2b3c4,5.6/7中8国9english0',i_c,1) into i_s from dual;
dbms_output.put_line(i_s);
end loop;
end;
/
i_c number(10) := 0;
i_s varchar2(10);
begin
while i_c <= length('1a2b3c4,5.6/7中8国9english0') loop
i_c := i_c + 1;
select substr('1a2b3c4,5.6/7中8国9english0',i_c,1) into i_s from dual;
dbms_output.put_line(i_s);
end loop;
end;
/
本文详细解析了SQL查询中字符提取的过程,并通过实例展示了如何使用PL/SQL块进行字符操作,包括从字符串中提取特定位置的字符并进行输出。
964

被折叠的 条评论
为什么被折叠?



