is possible mysql database generate 5 or 6 digit code comprised of numbers , letters when insert record? if how?
just goo.gl, bit.ly , jsfiddle it. exaple:
- http://bit.ly/3pkqcj
- http://jsfiddle.net/xzkvp
cz6ahf, 3t5mm, xgnpn, xswuds...
so uuid_short()
not work because returns value 23043966240817183
requirements:
- must unique (non-repeating)
- can not required based off of primary key integer value
- must scale (grow 1 character when possible combinations have been used)
- must random. (item
1234
cannotbcde
while item1235
bcdf
) - must generated on insert.
would appreciate code examples.
try this:
select left(uuid(), 6);
Comments
Post a Comment