mysql批量插入数据存储过程...
时间:2010-08-10 来源:treesky
DELIMITER $ USE `insert_test`$ DROP PROCEDURE IF EXISTS `INSERT_DATA`$ CREATE DEFINER=`root`@`%` PROCEDURE `INSERT_DATA`() BEGIN DECLARE times INT; DECLARE loops INT; SET times = 550000; SET loops = 0; WHILE loops < times DO INSERT INTO inserttable(`id`,`name`,`type`,`close`,result1,selectd)VALUES(loops,'我的名字','74','14.45','14','2010-08-10'); SET loops = loops + 1; END WHILE; END$ DELIMITER ;
相关阅读 更多 +