Best way to get a reasonably random key for MYSQL records
- by Steve N
Hi there,
I need to generate a reasonably random unique key for a table. It should be something like a GUID for MYSQL. I've tried UUID, but it looks like only the first few characters are actually random- the rest are the same every time I insert them.
Essentially, it is desirable for this key field to be very difficult to guess, even if you already have one known value in the column.
What is the best way to do this, and how should I set up the field data type to store the value efficiently?
Thank you,
Steve