Use the same seed for all the rows to do that, like:
select id from foo where rand(42) < 0.05 order by id desc limit 100
See the rand() docs for why it works that way. Change the seed if you want another set of values.
select id from foo where rand(42) < 0.05 order by id desc limit 100
No comments:
Post a Comment
Note: only a member of this blog may post a comment.