一、实现需求
题目:根据下面要求编写存储过程,并调用执行。具体要求如下:
1)编写一个存储过程,向表中随机插入1000条记录
SerialNO:使用序列方式,自增长
Filepath:使用随机插入6个字母
Partid:使用随机4位数字
StaffNO:从YTCZ060001.......到YTCZ060020 中随机抽取
RecordTime:从2012年8月1日之前的6个月中的随机抽取2)写一个程序块,循环调用500次存储过程,保证数据表中存储50万条记录。
二、对象准备
--创建表
create table circle (
serialno number not null
, filepath varchar2(6) not null
, partid number not null
, staffno varchar2(6) not null
, recordtime date not null
);
commit;
--创建序列
create sequence sq_circle
minvalue 0
maxvalue 999999999
start with 1
increment by 1
cache 20;
commit
三、实现代码</