日期:2014-05-16  浏览次数:20418 次

Oracle随机生成数字存储过程
create or replace procedure create_callstatistic
as
begin
for i in 1..4000000
loop
insert into up_callstatistic_data(USERIDENTIFIER,UPNUMBER,CALLINGADDRESS,CALLINGAREANUMBER,CALLEDADDRESS,CALLEDAREANUMBER,CALLSTARTTIME)
 values(round(dbms_random.value(1000000000,2000000000)),round(dbms_random.value(4008000000,4008999999)),round(dbms_random.value(51180000000,51189999999)),round(dbms_random.value(350,999)),round(dbms_random.value(51180000000,51189999999)),round(dbms_random.value(350,999)),'2011031311'||round(dbms_random.value(00,59))||round(dbms_random.value(00,59)));
commit;
end loop;
end;

我的异常网推荐解决方案:oracle存储过程,http://www.aiyiweb.com/oracle-develop/177537.html