> -----Original Message-----
> From: Chris [mailto:[EMAIL PROTECTED] 
> Sent: maandag 14 augustus 2006 4:18
> To: Mark
> Cc: mysql@lists.mysql.com
> Subject: Re: Random SELECT on subset
> 
> > Then I want to select 4 random columnIDs, but only from the
> > subset WHERE processed = '1' (so, from the group 1,3,4,5,7).
> 
> This query should do what you want:
> 
> SELECT columnID from table where process='1' order by rand()
> limit 4;

What? And all the FLOOR stuff can go? :) That sounds too simple, lol.

Well, thanks anyway; I'll go try it.

- Mark


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to