Re: [SQLObject] Select Single Random Record
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Oleg B. <ph...@ph...> - 2012-04-18 16:38:50
|
On Wed, Apr 18, 2012 at 12:30:10PM -0400, Adam Berg <ada...@gm...> wrote:
> What is the best way to select a single random record from a table and
> falls within the "where" criteria i have defined? I don't want to return a
> huge result set each time and then pick a random one
Please define "random" in the context of your task. Do you want a
different record every time? Or some non-deterministic record that could
be the same every time is a possible solution?
Oleg.
--
Oleg Broytman http://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|