Home : General : Databases and SQL :

General: Databases and SQL: Re: [Alex] RAND(): Edit Log

Here is the list of edits for this post
Re: [Alex] RAND()
Hello Alex,

Yes I agree I should not have to use now().

But the random function does not seem to work with a very limiting where condition.

As in : Select * from rand_test where a < 4 order by rand() limit 3

If there are only 3 matching records for the condition then order by rand() does not appear to work.

I get a result of 3,2,1 for the above query every time with MySql version 3.23.

Could I not expect 1,2,3 or 2,3,1 or 3,2,1 or 2,1,3 or 1,3,2 or 3,1,2 as possible results ?

Thanks

cornball

Last edited by:

cornball: Nov 27, 2002, 12:34 PM

Edit Log: