Re: Randomize Result Set Order

From: merlyn(at)stonehenge(dot)com (Randal L(dot) Schwartz)
To: Ryan Mahoney <ryan(at)paymentalliance(dot)net>
Cc: PostgreSQL general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Randomize Result Set Order
Date: 2001-09-27 22:47:15
Message-ID: m1zo7gp7yk.fsf@halfdome.holdit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>>> "Ryan" == Ryan Mahoney <ryan(at)paymentalliance(dot)net> writes:

Ryan> Is there an easy way to randomize the order that records get returned in?
Ryan> Don't imagine there is - but thought I'd ask ;)

order by random()

I even threw it into my latest Linux Magazine column, expounding the
virtues of the official Database of RedHat.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn(at)stonehenge(dot)com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-09-27 23:15:58 Re: Encoding passwords
Previous Message Arcady Genkin 2001-09-27 22:40:46 Re: Authenticating user `postgres'