oracle执行游标报错,oracle游标报错“超出范围”

oracle游标报错“超出范围”

关注:111  答案:2  手机版

解决时间 2021-03-01 21:37

提问者断念劫难

2021-03-01 09:37

BEGIN DECLARE dummy integer; BEGIN select 1 into dummy from dual where exists (select 1 from all_synonyms where owner = 'PUBLIC' and synonym_name = 'DBMS_WM'); EXCEPTION when NO_DATA_FOUND then RAISE_APPLICATION_ERROR(-20000, 'OWM Not Installed'); END; IF (sys.ltadm.existnonliveworkspaces OR sys.ltadm.existversionedtabs) THEN SYS.WM_ERROR.RAISEERROR(SYS.LT.WM_ERROR_189_NO); ELSE begin delete from wmsys.wm$workspaces_table; exception when others then null; end; begin delete from wmsys.wm$workspace_priv_table; exception when others then null; end; begin delete from wmsys.wm$version_hierarchy_table ; exception when others then null; end; begin execute immediate 'drop sequence wmsys.wm$up_del_trig_name_sequence' ; exception when others then null; end; begin execute immediate 'drop sequence wmsys.wm$insteadof_trigs_sequence' ; exception when others then null; end; begin execute immediate 'drop sequence wmsys.wm$lock_sequence' ; exception when others then null; end; begin execute immediate 'drop sequence wmsys.wm$vtid' ; exception when others then null; end; begin execute immediate 'drop sequence wmsys.wm$adt_sequence' ; exception when others then null; end; begin execute immediate 'drop sequence wmsys.wm$version_sequence' ; exception when others then null; end; begin execute immediate 'drop sequence wmsys.wm$row_sync_id_sequence' ; exception when others then null; end; begin execute immediate 'drop sequence wmsys.wm$udtrig_dispatcher_sequence' ; exception when others then null; end; execute immediate 'create sequence wmsys.wm$up_del_trig_name_sequence start with 4 nocache'; execute immediate 'create sequence wmsys.wm$insteadof_trigs_sequence start with 4 nocache'; execute immediate 'create sequence wmsys.wm$lock_sequence start with 8 incr ement by 2 nocache'; execute immediate 'create sequence wmsys.wm$vtid start with 4 nocache'; execute immediate 'create sequence wmsys.wm$adt_sequence start with 4 nocac he'; execute immediate 'create sequence wmsys.wm$version_sequence start with 4 n ocache'; execute immediate 'create sequence wmsys.wm$row_sync_id_sequence start with 14 nocache'; execute immediate 'create sequence wmsys.wm$udtrig_dispatcher_sequence star t with 4 nocache'; END IF ; COMMIT; END;我游标数值范围设置到1000了,请问这是什么问题?要怎么解决?

最佳答案

二级知识专家我有我风格

2021-03-01 11:05

oracle的变量,游标定义,都是在begin前

oracle里没有deallocate splitCur;

。。。很多问题

全部回答

1楼你哪知我潦倒为你

2021-03-01 12:20

不是这样的,存储过程中不是非要用游标啊,他有输入和输出参数,只要在过程中做相应的处理就会返回输出参数。游标的作用主要是为了循环提取数据,游标分隐性游标和显性游标。

举个例子(显性游标):

cursor 游标名 is select 语句;

.....

while 游标名% found loop

.....

end loop;

其中的select 语句提取的是一列值,然后每次取一个进行下面的循环。

(隐性游标):

for 游标名 in (select 语句)loop

.....

.....

end loop;

其中的select 语句提取的也是一列值,然后每次取一个进行下面的循环。

我要举报

如以上信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!

推荐资讯

大家都在看

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值