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);
2022-10-17 15:31:41
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);