0-Oracle测试插入10W条数据

来源:互联网 发布:南自通华 知乎 编辑:程序博客网 时间:2024/05/01 08:37
0-Oracle测试插入10W条数据

--sql
--创建测试用户
create user test identified by test;
--授权
grant dba to test;
--创建表
create table test.T1(ID NUMBER,AT DATE);
--创建存储过程,以“/”结束
create or replace procedure test.test (cnt in number) as
i NUMBER;
begin
for i in 1..cnt loop
INSERT INTO T1 VALUES(i,SYSDATE);
commit;
end LOOP;
END;
/

--插入10W条
exec test.test(100000);

原创粉丝点击