Re: randomized order in select?
| От | Enver ALTIN |
|---|---|
| Тема | Re: randomized order in select? |
| Дата | |
| Msg-id | 1078960521.31720.1.camel@enver.office.frontsite.com.tr обсуждение исходный текст |
| Ответ на | Re: randomized order in select? (Bruno Wolff III <bruno@wolff.to>) |
| Список | pgsql-sql |
On Wed, 2004-03-10 at 13:02 -0600, Bruno Wolff III wrote: > You can but it won't be very efficient (for large tables) as it will generate > a random ordering for the whole table, probably do a sort and then return the > first record. The only thing different you need to do is add () after random: > select tiptext from tips order by random() limit 1 Thanks. The whole table consists of about 100 rows and I don't think it will grow by, even twice. So this fits my needs just well. -- __________ | | | | Enver ALTIN (a.k.a. skyblue) | | Software developer, IT consultant | FRONT | |==========| FrontSITE Bilgi Teknolojisi A.Ş. |_____SITE_| http://www.frontsite.com.tr/
В списке pgsql-sql по дате отправления: