Re: [SQLObject] Select Single Random Record
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Adam B. <ada...@gm...> - 2012-04-18 17:25:22
|
Oleg Broytman <phd <at> phdru.name> writes: > > On Wed, Apr 18, 2012 at 12:30:10PM -0400, Adam Berg <adamberg <at> gmail.com> 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. It should be a different record each time. I don't need a way to produce the same results again. |