Created
July 10, 2020 05:45
-
-
Save mikelemus27/8857e3208ac27cdd5161fb5fa474da46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
CREATE PROCEDURE `my_proc_LOOP` (IN num INT) | |
BEGIN | |
DECLARE x INT; | |
SET x = 0; | |
loop_label: LOOP | |
INSERT INTO number VALUES (rand()); | |
SET x = x + 1; | |
IF x >= num | |
THEN | |
LEAVE loop_label; | |
END IF; | |
END LOOP; | |
END$$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment