insert multiple data into mysql with while

0

Good evening guys!

I created this code to insert 5 new users and passwords that follow a PAM1 ... PAM5 and CP@M20161 ... CP@M20165

CREATE PROCEDURE myfunction()
BEGIN
  DECLARE i INT DEFAULT 1;

  WHILE i < 6 DO
    INSERT INTO teste (userlogin, userpass) VALUES ("PAM" + i, MD5 ("CP@M2016" + i));
    SET i = i + 1;
  END WHILE;
END;

is not giving syntax error, but says the procedure already exists ... how to solve this problem, because the procedure will be done for 4000 inserts after it works ... Thanks in advance for your attention!

    
asked by anonymous 04.10.2016 / 01:23

0 answers