> You could also do ORDER BY RAND(), which I just discovered in the DuBois
> book when looking for the syntax of the RAND() function (which I haven't
> used before).
For a different take on retrieving random records, check out
http://www.bitbybit.dk/mysqlfaq/faq.html#ch7_21_0
/ Carsten
--
Carst
>> I'm not sure what the problem with this is? The first (unique) column is
>> independent of the second (random) column. If the random column has
>> duplicate values, it just means that the corrosponding first column
values
>> will be adjacent in the sorted table.
>If you're really depending o
George Eric R Contr AFSPC/CVYZ writes:
> I'm not sure what the problem with this is? The first (unique) column is
> independent of the second (random) column. If the random column has
> duplicate values, it just means that the corrosponding first column values
> will be adjacent in the sorted
>I can see one problem with this, which is that in the case that you
>get two identical number in the second column their order will be
>strongly dependent on the values in the first column.
I'm not sure what the problem with this is? The first (unique) column is
independent of the second (rand
George Eric R Contr AFSPC/CVYZ writes:
> How about this:
>
> Create a table with two columns. The first is autoincrement, so guarenteed
> unique. The second is random (but not neccesarily unique).
>
> Now sort this table by the second column.
> The first column, read in order, should now sui
How about this:
Create a table with two columns. The first is autoincrement, so guarenteed
unique. The second is random (but not neccesarily unique).
Now sort this table by the second column.
The first column, read in order, should now suit your needs, but I don't
think you can do inserts auto
Kyle Hayes wrote:
> On Friday 26 October 2001 10:00, Dana Holt wrote:
> > Can I automatically generate a random, unique, integer value in a certain
> > range when inserting data into a column using SQL?
> >
> > If so, how?
>
> Random is easy. Just find a good RNG (random number generator) somewh
On Friday 26 October 2001 10:00, Dana Holt wrote:
> Can I automatically generate a random, unique, integer value in a certain
> range when inserting data into a column using SQL?
>
> If so, how?
Random is easy. Just find a good RNG (random number generator) somewhere
(there are many available o
Dana Holt writes:
> Can I automatically generate a random, unique, integer value
> in a certain range when inserting data into a column using SQL?
"Random"? Like how "random"?
* Math.random() random? And still unique? That's really tough..
* Or just "you don't care, but not sequential" "rando