CURSOR

草稿也能丟,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;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章