Can this be done in the framework of plpgsql? I know
I can do it in the front end (java) but it would be
nice to aviod having to grab the rowcount first. I
haven't seen a random function in the documentation.
I could install another language but boy am I lazy :)
--- Mark Lane <mlane@mynewthing.com> wrote:
> On Tuesday 06 February 2001 13:11, you wrote:
> > Any suggestions on how to select a random record
> from
> > any given table?
> >
> > Culley
> >
> Set the range of the table index to a random number
> generator.
>
> if the index ranges from 100 to 10000 then you would
> multiply you random
> number by 9900 and then 100 to generate a random
> index number. Just remember
> to round the number to an integer.
>
> Mark
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/