我遇到了一个大的收sql我希望你能提供帮助。 ( I5 d, H# P2 B! G, c6 U/ ~使用以下代码:5 w+ |( M) d/ u, f2 r- D# P$ S+ l9 @
declare cursor c1 is select customer,product from products; type type_cust is table of products.customer%type; type type_prod is table of products.product%type; v_array_cust type_cust; v_array_prod type_prod;begin open c1; loop fetch c1 into v_array_cust,v_array_prod limit exit when c1%notfound; for i in 1..v_array_cust.count loop --Do some processing here. end loop; end loop;end;/游标c1返回53166行。, P6 X1 l9 B6 A3 D7 r& P% I
然而,代码处理53000行,然后结束。在检索最后166条记录时,似乎会出现故障。: a3 l+ w$ {* A- ]- E5 a& e
如果发现记录少于1000条,提取物是否会返回%notfound?我应该把出口移到循环的末尾吗?(我会尝试这种方法,但它需要3个小时才能到达故障点。2 Y/ L, i F7 [" V0 {
提前致谢。7 M5 ?: o; d& m' C a2 Y8 _