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