Rohan Malhotra wrote:
> What is difference between
>
> select * from items order by random() limit 5;
>
> and
>
> select * items limit 5;
>
> my basic requirement is to get random rows from a table, my where clause will make sure I won't get
> same rows in repeated execution of above queries.
The second query will not return the rows in a randomized order, but rather
in the order they are found. You should use the first query.
Yours,
Laurenz Albe