日期:2014-05-16  浏览次数:20493 次

循环插入数据
CREATE PROCEDURE SP_OPR(what_mysql INTEGER(12))
BEGIN
DECLARE _DONE INT DEFAULT 0;
REPEAT
SET _DONE=_DONE+1;
insert into mega_cp_key_word_tab (key_word,created_at,updated_at) values ('aaa','2011-04-07 12:12:12','2011-04-07 12:12:12');
UNTIL _DONE>what_mysql
END REPEAT;
END;

call SP_OPR(601);