mysql while 循环
DELIMITER $$ CREATE PROCEDURE pro_insert(IN maxNum INT) BEGIN DECLARE i INT DEFAULT(1); while i<=maxNum DO INSERT INTO employees (first_name ,last_name) VALUES ("z",CONCAT("sc",i)); SET i=i+1; END WHILE; END $$ DELIMITER ; CALL pro_insert(20);
喜欢请赞赏一下啦^_^
微信赞赏
支付宝赞赏