mysql - Field with numbers and letters -


i have table in have field requires 3 letters , 3 numbers (that have between values 2000 & 7000).

i've been reading around, , i'm still not sure better way handle issue, whether can simple datatype, instance char(6), or if there has field contains 3 letters, , field contains 3 numbers check restriction ensure values of field between 2000 & 7000.

any can offer me, glad. in advance

you may have give more specificity requirements, sounds me single column best option -- if order matters. if letters , numbers have meanings separately, should in 2 columns. otherwise, you'll end having concatenate them together.

char(6) fine long know always 6 characters exactly. can't enforce such specific limit 2000 7000 @ column level anyway (which 4 numbers, isn't it?)


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -