Re: Selecting a random row - Mailing list pgsql-general

From Holger Klawitter
Subject Re: Selecting a random row
Date
Msg-id 200411041355.33916.lists@klawitter.de
Whole thread Raw
In response to Selecting a random row  (Kari Lavikka <tuner@bdb.fi>)
Responses Re: Selecting a random row
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 04 November 2004 12:36, Kari Lavikka wrote:
> Is there any explanation for this strange behavior or are there better
> ways to select a random row?

How about

    SELECT ...whatever... ORDER BY random() LIMIT 1;

Mit freundlichem Gruß / With kind regards
    Holger Klawitter
- --
lists <at> klawitter <dot> de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFBiibF1Xdt0HKSwgYRAlJXAJ4nUpDfKBKCigPVMt8WpKG4gZmt4wCcD/ZC
KHBlBl1+5FZ4pgqkZlyzWQA=
=MrrE
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: Kari Lavikka
Date:
Subject: Selecting a random row
Next
From: Kari Lavikka
Date:
Subject: Re: Selecting a random row