1、新建存储过程(如果存储过程已经存在,先删除后重新新建):
delimiter //
create procedure getData()
BEGIN
DECLARE i INT;
SET i=1;
WHILE i<200000 DO
INSERT INTO trade VALUES ("172.20.0.41","2016-03-31_09-19-23.404","trade","sendMessage.trade.Test","main","2532",UUID(),"XGD","main","content");
SET i=i+1;
END WHILE;
END
//
2、调用存储过程:
CALL getData();
3、最后运行完之后,删除存储过程:
DROP PROCEDURE getData;