首页 > 代码库 > 161011、oracle批量插入数据

161011、oracle批量插入数据

需求:从一张表中查询数据插入到另外一张表

-- Created on 2016/10/13 by RICK 
declare
-- Local variables here begin for item in (select t.* from zc_tr_order_currency t where t.sys_corder_code=101303002) loop insert into ZC_TR_APPRAISE (id,CASH_CODE,USER_ID,USER_NAME,APPR_TYPE,APPR_RESULT,FLASK_TYPE,RATE_TYPE,SPECIAL_CODE,SCORE,RANK,CREATE_DATE,SYS_CORDER_CODE,SAVANT,APPR_FLAG) values (sys_guid(),item.id,ea488598dfa24767afea86ee9c5a2052,quan,item.currency_flag,1,1,2,-1,0,等级一,sysdate,item.SYS_CORDER_CODE,0,1); --dbms_output.put_line(i); end loop; commit;end;

 

161011、oracle批量插入数据