草稿也能丟,csdn夠臭的。
cursor
1 define : cur_test sys_refcursor
2 sql : sql_cur varcher2(200) := 'select a,b,c from tablec where a=:1 and b=:2 ';
3 open: open cur_test for sql_cur using cond1,cond2;
4 loop: loop
fetch cur_test bulk collect into results limit CN-LIM-SIZE;
for i in 1.. result.count loop
xxxxxxxxxxxxxx
end loop;
exit when CN-LIM-SIZE <200;
END LOOP;
CLOSE CUR_TEST;