What is the most efficient way to generate 8 character random alphanumeric string in TSQL?

Viewed 44672

I want to generate a unique 8 character random alphanumeric string in TSQL, for a mail confirm link. We are currently using a GUID but it is not very user friendly.

It only really has to obey a few rules:

  • be 8 Characters long
  • be unique
  • be generated efficiently
3 Answers
Related