欢迎投稿

今日深度:

Oracle快速插入100W数据

Oracle快速插入100W数据


创建表

 

create table TX_TEST
(
  ID         NUMBER not null,
  NAME       VARCHAR2(200),
  URL        VARCHAR2(300),
  POSITION   VARCHAR2(200),
  CREATETIME DATE
)

编写脚本

 

 

declare 
  -- Local variables here
  count integer;
begin
  -- Test statements here
  dbms_output.put_line('start:'||sysdate);
 
  for count in 1..1000000 loop
    insert into tx_test 
           values (count,'aa'||count,'http://www.baidu.com?id='||count,'Chinese-'||count,sysdate);
    commit;
  end loop;
 
  dbms_output.put_line('end:'||sysdate);
end;

 


www.htsjk.Com true http://www.htsjk.com/oracle/23191.html NewsArticle Oracle快速插入100W数据 创建表 create table TX_TEST( ID NUMBER not null, NAME VARCHAR2(200), URL VARCHAR2(300), POSITION VARCHAR2(200), CREATETIME DATE) 编写脚本 declare -- Local variables here count integer;begin -- Test statem...
评论暂时关闭