随机生成数据

create procedure insertTestDate()
begin
declare v int default 0;
while v < 10000000
do
insert into requestMessage
(
sendNumber,
recieveDate,
times,
mnc,
lac,
ci,
seq,
resultCode,
feetype,
serviceSPId,
serviceCPId,
platInfo,
batchId,
vendorId,
intrucChannlId,
protocolVersion,
spUsageCount,
regionId,
carrier,
risk,
profit
)
values (13700000000+((rand(v)*100000000) div 1),
adddate('2009-01-01',(rand(v)*36520) mod 3652),
adddate('2009-01-01',(rand(v)*36520) mod 3652),
1,
12,
13,
(rand(v)*4000000000) div 1,
1,
1,
1,
1,
12,
1,
1,
1,
1,
3,
(rand(v)*600000) div 1,
(rand(v)*3) div 1,
2,
2
);

set v = v + 1;
end while;
end

你可能感兴趣的:(数据)