Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (5k points)

I want to create a random, 17 characters long, ID. I am giving an example over here "AJB53JHS232ERO0H1". There should be random ordering. I tried creating an array with letters A-Z and a 'check' variable that randoms to 1-2. And in a loop;

Randomize 'check' to 1-2.

If (check == 1) then the character is a letter.

Pick a random index from the letters array.

else

Pick a random number.

Is there any easier way to do this?

Please log in or register to answer this question.

Related questions

Browse Categories

...