当前位置: 代码迷 >> Oracle管理 >> 生手,关于声明时集合下标出错
  详细解决方案

生手,关于声明时集合下标出错

热度:147   发布时间:2016-04-24 04:13:27.0
新手,关于声明时集合下标出错
declare 
       type id_domo_type is table of domo.id%type index by binary_integer; 
       type name_domo_type is table of domo.name%type index by binary_integer;
       id_domo id_domo_type;
       name_domo name_domo_type; 
       type point_domo_type is table of  binary_integer index by binary_integer;--问题出现的地方
       point_domo point_domo_type; 
begin
  select * bulk collect into id_domo,name_domo  from domo; 
  point_domo := point_domo_type(1002,2001,3458);
  forall i in values of point_domo--直接获取domo的集合值
  update domo set name = 'shui'||name_domo(i) where id = id_domo(i);
  commit;
  end;


  type point_domo_type is table of  binary_integer index by binary_integer;为什么这句不能添加index by binary_integer,很迷惑。我删去这句后执行就成功了,求解
------解决思路----------------------
你可以看看这篇文章,或许对你有帮助:
http://www.cnblogs.com/lfx0692/articles/2398082.html
  相关解决方案