输入banner图图片脚本导航/分类

PL/SQL实现JAVA中的split()方法的小例子

 1 declare
 2     v_str varchar2(200) := abd,324,u78,23f,sd09,2345,dsaf,9079;            
 3     type str_table_type is table of varchar2(50);
 4     strArr str_table_type := str_table_type(‘‘);
 5     v_index integer := 1;
 6 begin
 7       while (length(v_str)-length(replace(v_str,,,‘‘))) > 0 loop
 8           strArr(v_index) := substr(v_str,1,instr(v_str,,,1,1)-1);
 9           v_str := substr(v_str,instr(v_str,,,1,1)+1);
10           strArr.extend;
11           v_index := v_index + 1;
12       end loop;
13       strArr(v_index) := v_str;
14       for i in strArr.first..strArr.last loop
15          dbms_output.put_line(strArr(i));
16       end loop;
17 end;

 

PL/SQL实现JAVA中的split()方法的小例子

标签: