MySQL存储过程循环添加数据
时间:2021-07-01 10:21:17
帮助过:2人阅读
PROCEDURE IF EXISTS add_member;
DELIMITER $$
CREATE PROCEDURE add_member (
IN loop_times
INT)
BEGIN
DECLARE member_account
INT DEFAULT 0;
WHILE member_account
< loop_times DO
SET member_account
= member_account
+ 1;
INSERT INTO t_member ( member_name, member_password )
VALUES ( member_account,
‘e10adc3949ba59abbe56e057f20f883e‘ );
END WHILE;
END $$
CALL add_member (10000000);
MySQL存储过程循环添加数据
标签: