Re: Random tuple?

Поиск
Список
Период
Сортировка
От Jon Jensen
Тема Re: Random tuple?
Дата
Msg-id Pine.LNX.4.44.0210182312410.1312-100000@louche.swelter.net
обсуждение исходный текст
Ответ на Random tuple?  ("Brendan LeFebvre" <brendanl@iname.com>)
Список pgsql-novice
On Fri, 18 Oct 2002, Brendan LeFebvre wrote:

> Is there available a routine, intrinsic or otherwise, that allows for simple
> extraction of one(1) random tuple from a given table or query-result?

How about:

SELECT * FROM your_table ORDER BY random() LIMIT 1

Jon


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

Предыдущее
От: "Brendan LeFebvre"
Дата:
Сообщение: Random tuple?
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Random tuple?