> > *] I need to generate a RANDOM UNIQUE number for every new record. Is
there an
> > *] easy way to accomplish this inside of mySQL.
> > *]

What are the requirements for 'random' and 'unique'? Do you need some sort
of cryptographic randomness? Does uniqueness be kept across tables?

If you 'only' need a unque id you could you AUTO_INCREMENT. If you want
uniqueness to carry over tables etc. you could take a look at the aproach
made by the Apache module mod_unique_id. If you need a cryptographic
randomness you should look into some litterature about the area so as to get
a better understanding of what you truly need.

--
Aigars




---------------------------------------------------------------------
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