Re: random rows

From: Joel Burton <jburton(at)scw(dot)org>
To: Jie Liang <jliang(at)ipinc(dot)com>
Cc: "Ing(dot) Roberto Andrade Fonseca" <randrade(at)abl(dot)com(dot)mx>, pgsql-admin(at)postgresql(dot)org
Subject: Re: random rows
Date: 2001-04-26 20:35:33
Message-ID: Pine.LNX.4.21.0104261634460.2565-100000@olympus.scw.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-sql

On Thu, 26 Apr 2001, Jie Liang wrote:

> > I've donne something like:
> >
> > prereg_iw=# select random(), nombre from asistente order by 1 limit 10;
> > random | nombre
> > ----------------------+---------------
> > 0.000214523170243261 | ALFONSO
> > 0.000478655100091666 | OSCAR
> > 0.000892118085591177 | JOSE LUIS
> > 0.000972398091560415 | IGNACIO
> > 0.00109919300354048 | NORBERTO
> > 0.00180558208460248 | SALVADOR
> > 0.00196880800741204 | ANDRES NOE
> > 0.00197171233686233 | SARA MICHELLE
> > 0.00226354412839913 | DAVID
> > 0.00233715307076329 | RODOLFO
> > (10 rows)

How totally obvious in retrospect, and how much better of a solution than
the ones I offered. D'oh!

Thanks for posting it to the list.

--
Joel Burton <jburton(at)scw(dot)org>
Director of Information Systems, Support Center of Washington

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message cacto.com 2001-04-26 20:51:47 Mirror Data Base
Previous Message J.H.M. Dassen Ray 2001-04-26 19:53:32 Re: random rows

Browse pgsql-general by date

  From Date Subject
Next Message Thomas F. O'Connell 2001-04-26 21:32:52 creating constants in postgres
Previous Message Oliver Elphick 2001-04-26 20:34:44 Re: Re: Struggling to change default data location

Browse pgsql-sql by date

  From Date Subject
Next Message Joel Burton 2001-04-26 20:53:47 Re: rules
Previous Message J.H.M. Dassen Ray 2001-04-26 19:53:32 Re: random rows