1. test windows 方式
建表
create table test2(id int,name varchar2(30));
建序列
create sequence seq_id
minvalue 1
nomaxvalue
start with 1
increment by 1
cache 200;
插入数据
declare
maxrecords constant int:=100000;
i int :=1;
begin
for i in 1..maxrecords loop
Link URL: http://hi.baidu.com/8060/blog/item/cc095a36ba1fb1daa3cc2bdc.html
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/61775/viewspace-589010/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/61775/viewspace-589010/
本文介绍如何使用Oracle数据库通过序列自增的方式批量插入大量数据。通过创建表和序列,并利用PL/SQL块循环插入指定数量的数据,提高数据插入效率。

530

被折叠的 条评论
为什么被折叠?



