C/C++教程

Oracle海量数据快速处理bulk

本文主要是介绍Oracle海量数据快速处理bulk,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

Oracle海量数据快速处理bulk

Procedure P_EmployeeAccount( Ri_Ret Out Int,

Rv_Msg Out Varchar2) Is

Rec_Test_2021 Test_2021%Rowtype;

type type_tmp is record(

A Test_2021.A%type,

B Test_2021.B%type,

C Test_2021.C%type);

type type_record is table of type_tmp index by binary_integer;

tab_type_record type_record;

ii integer :=0;

Begin

Ri_Ret :=Null;

Rv_Msg :=‘执行成功!’;

tab_type_record.delete;

ii :=0;

Select A,B,C bulk collect

into tab_type_record From Test_2021 a Where 1=1;

if tab_type_record.count <=0 then

return;

end if;

for ii in tab_type_record.first … tab_type_record.last loop

Insert Into TEST_2021(A,B,C)

Select

tab_type_record(ii).A,

tab_type_record(ii).B,

tab_type_record(ii).C

From Test_2021 t Where 1=1;

End Loop;

End P_EmployeeAccount;

这篇关于Oracle海量数据快速处理bulk的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!