oracle有多少行代码,Oracle批量收集问题

我对批量收集SQL有点小问题,我希望您能帮助解决这个问题。

使用以下代码:

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 1000;

exit when c1%notfound;

for i in 1..v_array_cust.count

loop

--Do some processing here.

end loop;

end loop;

end;

/

光标c1返回53166行。

但是,代码处理53000行,然后结束。似乎在检索最后166条记录时,会出现某种故障。

如果查找到的记录少于1000条,则提取将返回%NotFound吗?我应该把出口移到循环的末尾吗?(我将尝试这个方法,但这段代码需要3个小时才能到达故障点。)

事先谢谢。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值