I would like to generate a short, unique ID without having to check for collisions.
I currently do something like this, but the ID I currently generate is random and che
you can use a bitwise XOR to scramble some of the bits:
select thefield ^ 377 from thetable; +-----+---------+ | a | a ^ 377 | +-----+---------+ | 154 | 483 | | 152 | 481 | | 69 | 316 | | 35 | 346 | | 72 | 305 | | 139 | 498 | | 96 | 281 | | 31 | 358 | | 11 | 370 | | 127 | 262 | +-----+---------+