Posted on 2015-01-05 10:05
S.l.e!ep.¢% 阅读(396)
评论(0) 编辑 收藏 引用 所属分类:
DataBase
DROP PROCEDURE test_insert ;
DELIMITER ;;
CREATE PROCEDURE test_insert ()
DECLARE i INT DEFAULT 1;
DECLARE maxid INT DEFAULT 1;
set i = 1;
set maxid = (select max(id) from tablename);
START TRANSACTION;
WHILE i<1000000
DO
SET i=i+1;
END WHILE ;
commit;
END;;
CALL test_insert();