Oracle PL/SQL: BULK COLLECT and FORALL usage
create table t1 as select * from all_objects where 1=2;
create or replace procedure fast_proc is
TYPE TObjectTable is table of ALL_OBJECTS%ROWTYPE;
ObjectTable$ TObjectTable;
BEGIN
select *
BULK COLLECT INTO ObjectTable$
from ALL_OBJECTS;
forall rowX in ObjectTable$.First..ObjectTable$.Last
insert into t1 values ObjectTable$(rowX);
END;
/
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment