mysql快速生成测试数据

CREATE DEFINER=`root`@`localhost` PROCEDURE `批量生成测试数据`()

BEGIN

#Routine body goes here…

declare i int default 1;

set autocommit = 0;

repeat

set i = i + 1;

insert into system_hospital(name,alias,phone,address,image,level,intro,province,city,area,bus,pachong_url,latitude,longitude)

values (CONCAT(‘测试名称’,i),CONCAT(‘测试别名’,i),CONCAT(‘测试电话’,i),CONCAT(‘测试地址’,i),CONCAT(‘测试图片’,i),CONCAT(‘测试等级’,i),CONCAT(‘测试简介’,i),CONCAT(‘测试省’,i),CONCAT(‘测试市’,i),CONCAT(‘测试区’,i),CONCAT(‘测试公交’,i),CONCAT(‘测试爬虫地址’,i),CONCAT(‘测试经度’,i),CONCAT(‘测试纬度’,i));

until i = 100000

end repeat;

commit;

END