randomized order in select? - Mailing list pgsql-sql

From Enver ALTIN
Subject randomized order in select?
Date
Msg-id 1078937297.29628.12.camel@enver.office.frontsite.com.tr
Whole thread Raw
Responses Re: randomized order in select?
Re: randomized order in select?
List pgsql-sql
Hi,

I have got a simple table like this:
       create table tips (           id integer primary key unique,           tiptext text       );

and, I've got a website where I'm willing to show these tips in a random
order. Each visitor will get a randomly selected tip. So for now, I have
to do 2 queries:
select id from tips

collect an ID list, choose one randomly and retrieve it. I wish I could
do something like:
select tiptext from tips order by random limit 1

in PostgreSQL.
-- __________
|          |
|          |  Enver ALTIN (a.k.a. skyblue)
|          |  Software developer, IT consultant
|    FRONT |
|==========|  FrontSITE Bilgi Teknolojisi A.Ş.
|_____SITE_|  http://www.frontsite.com.tr/

pgsql-sql by date:

Previous
From: "David"
Date:
Subject: Changing primary keys
Next
From: "scott.marlowe"
Date:
Subject: Re: randomized order in select?