Row ID alternative

I would think that RANDBETWEEN could always have the potential to return duplicates and would constantly change, unless you are somehow building in logic to save that random value…and even then, it would have to somehow allow multiple users to get a unique random number at the same time

I think the safest bet for a short and unique random number would be some kind of mathematical logic that uses the date and time in combination with a number generated from part of a user’s name and a global number that gets incremented, and combines all of those numbers together. Still not fool proof, but much less likely to run into duplicate ID numbers.

2 Likes