<返回更多

Oracle海量数据快速处理bulk

2019-09-11    
加入收藏
Oracle海量数据快速处理bulk

 

Procedure P_EmployeeAccount( Ri_Ret Out Int,

Rv_Msg Out Varchar2) Is

Rec_Test_2017 Test_2017%Rowtype;

type type_tmp is record(

A Test_2016.A%type,

B Test_2016.B%type,

C Test_2016.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_2016 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_2018(A,B,C)

Select

tab_type_record(ii).A,

tab_type_record(ii).B,

tab_type_record(ii).C

From Test_2017 t Where 1=1;

End Loop;

End P_EmployeeAccount;

声明:本站部分内容来自互联网,如有版权侵犯或其他问题请与我们联系,我们将立即删除或处理。
▍相关推荐
更多资讯 >>>