oracle 测试窗口批量插入数据

/*
1、拼接字符串 ||
2、字符类型要注意,number,char,date
*/

declare 
  v_tid  number;
  begin
    v_tid :=1;
    while v_tid <=1000 loop
      
    --接口监控明细插入数据
    insert into tb_table (TUID, GUID, VERSION, PACKAGEINDEX, PACKAGECOUNT, VEHICLECONFIG, MAINITEMCODE, SUBITEMCODE, NATIONALVERSION, CARSERIES, FACTORYCODE, QTY, RISEYEAR, IDENTITYCODE, STATUS, ERRORDESC, CREATEBY, CREATEDATE, UPDATEBY, UPDATEDATE)
    values ('20230506-110353-5317-81' || v_tid, '20230506-110353-3569-57065', '202007001', 1, 3, '配置1', '物料号', '物料号', '11', '配置', '工厂', 10, '2023', '123', 0, null, '20200917-134421-8819-97993', to_date('06-05-2023 11:03:53', 'dd-mm-yyyy hh24:mi:ss'), '20200917-134421-8819-97993', to_date('06-05-2023 11:03:53', 'dd-mm-yyyy hh24:mi:ss'));
    
    v_tid:=v_tid+1;
    end loop;   
    commit;
    dbms_output.put_line('导入成功');
end;

  

posted on 2023-05-17 18:04  波音666  阅读(63)  评论(0编辑  收藏  举报

导航