select 2 random rows

Поиск
Список
Период
Сортировка
От Rory Campbell-Lange
Тема select 2 random rows
Дата
Msg-id 20020627224206.GA5479@campbell-lange.net
обсуждение исходный текст
Ответы command length?
Re: select 2 random rows
Список pgsql-novice
I'd like to select 2 random rows from a table.
At the moment I'm returning a couple of hundred rows into a perl hash
and randomising it there, but it would be great if I could do it in the
database call.

Each row has an id number created using the SERIAL type.

Thanks for any help.
Rory
--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>



В списке pgsql-novice по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Date Question
Следующее
От: stev knowles
Дата:
Сообщение: command length?