DROP PROCEDURE IF EXISTS proc_initData;–如果存在此存储过程则删掉
DELIMITER $
CREATE PROCEDURE proc_initData(); //方法名
BEGIN
DECLARE i INT DEFAULT 1;
WHILE i<=50000000【插入数据量】 DO
INSERT INTO t_req_record_tp【表名】(os,ver_code,sys_code,branch,login_type,login_acct,is_auto,imei,os_ver,state,created_by,create_time,modified_by,modify_time,is_valid)
VALUES (‘andr’,‘1’,‘tsyxx’,‘test’,‘1’,‘test’,‘0’,’’,1,‘00’,’’,‘2020-09-15 14:30:22’,’’,‘2020-09-15 14:30:22’,1);
SET i = i+1;
END WHILE;
END $
call proc_initData //调用方法