On 11/29/04 12:27 PM, "mos" <[EMAIL PROTECTED]> wrote:
> Mike, > Your solution is way too complicated (it makes my head hurt).<g> > Try this: > > set @n=0; > update tmp set rnd = @n := @n + 1 order by RAND() > > Mike
I'll give this a shot. Follow-up question:
I've had a lot of trouble with RAND() on my MySQL 3 box not being all that random. This time I'm using 4.0.17-log. Is it going to be any better?
~ Mike
Mike,
According to http://dev.mysql.com/doc/mysql/en/News-4.0.1.html they've improved Rand in version 4.0.1 "Changed RAND() initialization so that RAND(N) and RAND(N+1) are more distinct. " and in 4.0.10 they "Fixed initialization of the random seed for newly created threads to give a better rand() distribution from the first call. "
Mike
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]