批量插入数据存储过程备忘
1 DELIMITER / 2 CREATE PROCEDURE insertuser() 3 BEGIN 4 SET @i = 1000; 5 SET @temp = 'xxx'; 6 WHILE @i < 3000 DO 7 SET @username = CONCAT(@temp,@i); 8 INSERT INTO xxx(id,username,password,nikename,head,email,ischeckemail) values 9 (@username,@username,'password',@username,'head.png','xxxxxxx@qq.com','true'); 10 SET @i=@i+1; 11 END WHILE; 12 END 13 / 14 DELIMITER ; 15 CALL insertuser();