oracle表海量数据处理,Oracle海量数据快速处理bulk

2c0b9e35e18027693685c038946e7236.png

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;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值