Skip to content

Instantly share code, notes, and snippets.

@CharlyPoppins
Created September 21, 2021 11:34
Show Gist options
  • Save CharlyPoppins/6f40b8bcc6c1930b0e1a250a8aa0b2ae to your computer and use it in GitHub Desktop.
Save CharlyPoppins/6f40b8bcc6c1930b0e1a250a8aa0b2ae to your computer and use it in GitHub Desktop.
DROP PROCEDURE my_loop;
CREATE PROCEDURE my_loop ()
BEGIN
DECLARE
i INT DEFAULT 7;
WHILE (i < 78)
DO INSERT INTO my_table (field_1, field_2)
VALUES(i, 'test');
SET i = i + 1;
END WHILE;
END;
CALL my_loop();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment