mysql 存储过程动态表中添加测试数据
DELIMITER $$
USE `rc_temp`$$
DROP PROCEDURE IF EXISTS `test_pro`$$
CREATE DEFINER=`root`@`%` PROCEDURE `test_pro`()
BEGIN
DECLARE i INT DEFAULT 0;
SET i = 10001;
SELECT i ;
WHILE (i<100000) DO
#SELECT i ;
INSERT INTO test_key(`NAME`,key1,key2,key3) VALUES(CONCAT('name',i) ,i,i,i);
SET i=i+1;
END WHILE;
END$$
DELIMITER ;
CALL test_pro() ;