A stackoverflow thread (http://stackoverflow.com/questions/5806 ... ows-in-sql) suggests
Code: Select all
SELECT column FROM table
ORDER BY RANDOM()
LIMIT 1
Anyone have a problem with this code snippet?
Moderator: NorbertKrupa
Code: Select all
SELECT column FROM table
ORDER BY RANDOM()
LIMIT 1
OK...seems like what he didn't like about it was that it doesn't scale well. I'm only doing some spot-checking, so scaling isn't really a concern for me.sKwa wrote: I have no, but book Sql Antipatterns does.
I'll check that out.sKwa wrote: May be this thread will interest you too:
Selecting a Random Set of Rows from a Table