Randomize SQL

//After WHERE and all the AND's
AND RAND()<(SELECT ((5/COUNT(*))*10)) ORDER BY RAND()
LIMIT 0, 5

//Standalone
SELECT * FROM myTable WHERE RAND()<(SELECT ((1/COUNT(*))*10) FROM myTable) ORDER BY RAND() LIMIT 1;

0 Comments

You must be logged in to post a comment.