drop table t ;
create table t as select * from dba_objects;
create index i_t_id on t(object_id);
/
create or replace procedure p_update as
type type_1 is table of t%rowtype index by binary_integer;
va type_1;
cur sys_refcursor;
begin
open cur for 'select *from dba_objects t where owner=''SYS''';
loop
fetch cur bulk collect
into va limit 10000;
exit when va.count = 0;
forall i in 1 .. va.count
update t
set t.object_name = va(i).object_name
where t.object_id = va(i).object_id;
commit;
去66狗8 发表于 2013-11-7 20:36
完整点。
我现在连存储过程都不会调啊。
loop
update table
set comlumn1=你要修改后的值
where rownum<=10000;
if sql%found then
commit;
else
exit;
end if;
end loop;