Re: [GENERAL] limitby without orderby

2011-09-22 Thread Scott Marlowe
On Thu, Sep 22, 2011 at 5:32 AM, Rohan Malhotra wrote: > Hi Gurus, > 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 repe

[GENERAL] limitby without orderby

2011-09-22 Thread Henry Drexler
*From*: Rohan Malhotra select * from items order by random() 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. -- Regards To clarify, you are not looking for random then yes? as you

Re: [GENERAL] limitby without orderby

2011-09-22 Thread Albe Laurenz
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 queri

Re: [GENERAL] limitby without orderby

2011-09-22 Thread Ondrej Ivanič
Hi, On 22 September 2011 21:32, Rohan Malhotra wrote: > Hi Gurus, > 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 This one says: give me first five rows which

[GENERAL] limitby without orderby

2011-09-22 Thread Rohan Malhotra
Hi Gurus, 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. -- Regards