Created
June 22, 2019 09:28
-
-
Save genert/785b2720e4907a7bc3090ba103c8622a to your computer and use it in GitHub Desktop.
Random Key Value Between 1 and MAX
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
SELECT b1.* | |
FROM Bugs AS b1 | |
JOIN (SELECT CEIL(RAND() * (SELECT MAX(bug_id) FROM Bugs)) AS rand_id) AS b2 | |
ON (b1.bug_id = b2.rand_id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment