简单的数据制造方法

上一篇 / 下一篇  2014-12-12 14:36:53 / 个人分类:oracle

简单的数据制造方法:

declare
i int;
begin
for i in 1..1000000 loop
insert  into t_push_smresponselog values
(i,'1311'||LPAD(i,7,'0'),'是',to_date('2013-7-19 00:00:00','yyyy-mm-dd hh24:mi:ss')+(i/24/60/60) ,'1','42','','7','1','','','','','10658099020027','5','10009999','','','','0');
end loop;
commit;
end;
/
 
--向黑名单表中插入10100000001,10100010001之间的号码
declare
i int;
begin
for i in 1..2000 loop
insert  into t_push_blackuser
(
msisdn,
opertime,
limittype,
operator,
channeltype,
usrruleid,
sequence,
accounttype,
provincelist,
validtime,
invalidtime)
values
((select trunc(dbms_random.value(10100000001,10100010001)) from dual),
'20141211160543',
'0',
'sysadmin',
'1',
'',
'',
'',
'',
'',
''
);
end loop;
commit;
end;
/

TAG:

 

评分:0

我来说两句

日历

« 2024-04-19  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 31079
  • 日志数: 38
  • 建立时间: 2014-03-21
  • 更新时间: 2015-04-28

RSS订阅

Open Toolbar