Last active
December 21, 2015 11:49
-
-
Save ryaan-anthony/6301380 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 ;; | |
| drop procedure if exists wtfman;; | |
| create procedure wtfman() | |
| begin | |
| SET @count = 0; | |
| WHILE @count < 10 DO | |
| SELECT @var := id FROM source ORDER BY RAND() LIMIT 1; | |
| INSERT INTO test VALUES (@var); | |
| SET @count = @count + 1; | |
| END WHILE; | |
| end | |
| ;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment