Xah Lee wrote:
>
> Thanks Tschau Christian. The proposed solution works.
>
> However, isn't there a proper method to get random rows? (instead of adding
> a 'random' column ad hoc to a table.)
>
> Does SQL/92 specify a way to select rows randomly?
>
> Xah
< cut >
Hi
On the mysql TODO list "F.2 Things that have to be done sometime":
Allow sorting on RAND():
SELECT email,RAND() AS ran FROM info ORDER BY ran;
But this isn't standard SQL92.
SQL92 doesn't provide any syntax for 'random order'.
With SQL92 only, you have to generate the random values to fill the additional 'random'
column yourself!
Tschau
Christian