Now that I look at tables with lots of UNIQUEID() generated data, it just looks like a 32 bit int in hex. I might have been misled by the documentation, which says there are โtrillionsโ of possibilities.
If fear of collisions keep you up a night (rational or not), use the โUUIDโ argument with UNIQUEID() or write your own generator. Thatโs UNIQUEID(โUUIDโ). Function that compactly generates a 1 in 53 trillion chance of collision:
=CONCATENATE(
MID(2345679abcdefghjkmnpqrstuvwxyzACDEFGHJKMNPQRSTUVWXYZ,RANDBETWEEN(1,52),1),
MID(2345679abcdefghjkmnpqrstuvwxyzACDEFGHJKMNPQRSTUVWXYZ,RANDBETWEEN(1,52),1),
MID(2345679abcdefghjkmnpqrstuvwxyzACDEFGHJKMNPQRSTUVWXYZ,RANDBETWEEN(1,52),1),
MID(2345679abcdefghjkmnpqrstuvwxyzACDEFGHJKMNPQRSTUVWXYZ,RANDBETWEEN(1,52),1),
MID(2345679abcdefghjkmnpqrstuvwxyzACDEFGHJKMNPQRSTUVWXYZ,RANDBETWEEN(1,52),1),
MID(2345679abcdefghjkmnpqrstuvwxyzACDEFGHJKMNPQRSTUVWXYZ,RANDBETWEEN(1,52),1),
MID(2345679abcdefghjkmnpqrstuvwxyzACDEFGHJKMNPQRSTUVWXYZ,RANDBETWEEN(1,52),1),
MID(2345679abcdefghjkmnpqrstuvwxyzACDEFGHJKMNPQRSTUVWXYZ,RANDBETWEEN(1,52),1))
I got rid of look-alikes such as 0, O, 1, l but you can put them back in and put in other wacky characters (as in UUENCODE) to decrease collision chances.
This should be in the #tips category.
User | Count |
---|---|
43 | |
30 | |
25 | |
23 | |
13 |