How To Select Random Records Using MySQL

1 2 3 4 5 |
SELECT * FROM yourTable WHERE yourField='WhatYouWishToFindGoesHere' ORDER BY RAND() LIMIT 5 |
1 2 3 4 5 |
SELECT * FROM yourTable WHERE yourField='WhatYouWishToFindGoesHere' ORDER BY RAND() LIMIT 5 |
Categories: How-To's, Technology Tags: howto, Limit, mysql, Order, ORDER BY, rand, Random, sort, SQL, tips
|
No comments
Copyright © 2005-2025 Eric Michael Stone | Random Thoughts, Whims and Fancies…. Powered by WordPress