Which is best data type for phone number in MySQL and what should Java type mapping for it be?
Strings & VARCHAR. Do not try storing phone numbers as actual numbers. it will ruin the formatting, remove preceding 0s and other undesirable things. You may, if you choose to, restrict user inputs to just numeric values but even in that case, keep your backing persisted data as characters/strings and not numbers. Be aware of … Read more