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 automatically using these values.




-----Original Message-----
From: Dana Holt [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 26, 2001 11:00 AM
To: mySQL General List (E-mail)
Subject: Generate random, unique value...



Can I automatically generate a random, unique, integer value in a certain
range when inserting data into a column using SQL?

If so, how?

Thanks..

Dana


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to