| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | May 7 2002 5:14pm |
| Subject: | Re: Using RAND() | ||
| View as plain text | |||
At 11:32 -0400 5/7/02, Cummings, Shawn (GNAPs) wrote: >The RAND() syntax does not appear to be working for me. > >What version mySQL is required? 3.23.2. Prior to that, use SELECT something, any_col*0+RAND() AS r FROM sometable WHERE ... ORDER BY r LIMIT 10 > > >At 04:43 PM 1/29/2002 +0200, Michael Widenius wrote: > >>Hi! >> >>>>>>> "Ulf" == Ulf Harnhammar <ulf@stripped> writes: >> >>Ulf> On Sun, 27 Jan 2002, Michael Widenius wrote: >>>> One way to do this is to do as follows: >>>> SELECT something FROM sometable WHERE somevar=somevalue ORDER BY >> >> RAND() LIMIT 10
| Thread | ||
|---|---|---|
| • Using LIMIT to select random rows | Ulf Harnhammar | 23 Jan |
| • Re: Using LIMIT to select random rows | Sinisa Milivojevic | 23 Jan |
| • Re: Using LIMIT to select random rows | Michael Widenius | 27 Jan |
| • Re: Using LIMIT to select random rows | Ulf Harnhammar | 29 Jan |
| • Re: Using LIMIT to select random rows | Michael Widenius | 29 Jan |
| • Using RAND() | GNAPs) | 7 May |
| • RE: Using RAND() | Gurhan Ozen | 7 May |
| • Re: Using RAND() | webmaster | 7 May |
| • RE: Using RAND() | Gurhan Ozen | 7 May |
| • Re: Using RAND() | Paul DuBois | 7 May |
| • RE: Using LIMIT to select random rows | Gordon | 29 Jan |
| • RE: Using LIMIT to select random rows | Steven Lagerweij | 23 Jan |
